Node:and then, Next:, Previous:and, Up:Reference



and then

Synopsis


{ `and then' is built in. A user-defined operator cannot consist of
   two words. }
operator and then (operand1, operand2: Boolean) = Result: Boolean;

Description

and then is an alias for the short-circuit logical operator and_then.

Conforming to

While and_then is defined in ISO 10206 Extended Pascal, and then is a GNU Pascal extension.

Example


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.

See also

Keywords, and_then, and, or else.