[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
{ `and then' is built in. A user-defined operator cannot consist of two words. } operator and then (operand1, operand2: Boolean) = Result: Boolean; |
`and then' is an alias for the short-circuit logical operator `and_then'.
While `and_then' is defined in ISO-10206 Extended Pascal, `and then' is a GNU Extension.
program AndThenDemo; var p: ^Integer; begin New (p); ReadLn (p^); if (p <> nil) and then (p^ < 42) then { This is safe. } WriteLn (p^, ' is less than 42') end. |
section 9.9 and_then, section 9.7 and, section 9.182 or else.