Shortcut IF statements ====================== Shortcut ANDs ------------- Instead of doing: IF condition1 AND condition2 AND condition3 THEN ... you can do: IF condition1 THEN IF condition2 THEN IF condition3 THEN ... In the first example every expression has to be evaluated before the THEN is followed. With AND it is obvious that if one of the conditions if false, it is irrelevant what the other conditions are and the whole test condition will be false. With the rewritten example, as soon as a condition is found to be false, all the rest of the tests are skipped. This is actually needed if part of the condition can't actually be legitimally tested if an earlier condition is false. For instance: IF address<&FC00 AND ?address=value THEN ... This will not work correctly as if address=&FC00 then the test accesses the invalid memory range even though the whole condition expression would give a false result. Rewiting it as: IF address<&FC00 THEN IF ?address=value THEN ... means that the memory is tested only if the memory is in a valid reange, The THENs can often be omitted, or replaced with a colon, so you can also write this as: IF address<&FC00:IF ?address=value: ... Shortcut ORs ------------ The similar action can be done with OR, but you have to rewrite the expression to swap the true/false result. For example: IF condition1 OR condition2 OR condition3 THEN ... becomes IF NOT condition1:IF NOT condition2:IF NOT condition3 ELSE ... For example, IF A=1 OR A=4 OR A=6 THEN ... becomes IF A<>1:IF A<>4:IF A<>6 ELSE ...