while testing a mpl i wrote "auto message with different color output"
we found that the OR statement only works on the first condition and not rest.
see code below:
if not pc = 'PURPLE' or pc = 'BLUE' or pc = 'GREEN' or pc = 'RED' thenUse parenthesis... it happens in FPC also.
if not pc = 'PURPLE' or pc = 'BLUE' or pc = 'GREEN' or pc = 'RED' theUse parenthesis... it happens in FPC also.
DO it like this:
if ((not pc = 'PURPLE') or (pc = 'BLUE') or (pc = 'GREEN') or (pc = 'RED')) then
if not pc = 'PURPLE' or pc = 'BLUE' or pc = 'GREEN' or pc = 'RED' theUse parenthesis... it happens in FPC also.
DO it like this:
if ((not pc = 'PURPLE') or (pc = 'BLUE') or (pc = 'GREEN') or (pc = 'RED')) then
Haven't test it, but it should work.
we found that the OR statement only works on the first condition and not rest.
pc := upper(paramstr(1));
if not pc = 'PURPLE' or pc = 'BLUE' or pc = 'GREEN' or pc = 'RED' then
we found that the OR statement only works on the first condition and rest.I responded to this in 0net but I'll respond here too in case you haven't seen it.
This appears to be a programming logic error not a bug in Mystic. You
are only adding NOT to the first condition. You need to use parenthesis when you want to negate an entire list of conditions:
if not (pc = 'purple' or pc = 'blue') then
Or you could also do:
if pc <> 'purple' and pc <> 'blue' and pc <> 'green' then
This appears to be a programming logic error not a bug in Mystic. You
are only adding NOT to the first condition. You need to use parenthesis when you want to negate an entire list of conditions:
if not (pc = 'purple' or pc = 'blue') then
if pc <> 'purple' and pc <> 'blue' and pc <> 'green' then
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 369 |
Nodes: | 16 (2 / 14) |
Uptime: | 88:45:36 |
Calls: | 7,896 |
Calls today: | 2 |
Files: | 12,968 |
Messages: | 5,792,366 |