2 Formal Description

The short-circuited logical functions are units.

5.1

A) UNIT{32d} :: ... ; and function{57a} ; or function {57b}.

These logical functions are pseudo-operators providing logical AND and OR functions with short-circuited elaboration.

5.7 Short-circuit logical functions

{ The short-circuit logical functions are pseudo-operators providing
   logical AND and OR functions with short-circuited elaboration.  }

5.7.1 Syntax

a) boolean NEST and function{5A} :
     meek boolean NEST TERTIARY1, andth{94c} token ; meek boolean NEST TERTIARY2.

b) boolean NEST or function{5A} :
     meek boolean NEST TERTIARY1, orel{94c} token ; meek boolean NEST TERTIARY2.

c) *boolean NEST short circuit function :
     boolean NEST and function{a} ; boolean NEST or function{b}.

5.7.2 Semantics

a) The yield of an and-function F, in an environ E, is determined
   as follows:
   . let t be the yield of TERTIARY1 in E.
   . If t = false,
     then the yield of F is false;
     otherwise the yield of F is the yield of TERTIARY2 in E.

b) The yield of an or-function F, in an environ E, is determined
   as follows:
   . let t be the yield of TERTIARY1 in E.
   . If t = true,
     then the yield of F is true;
     otherwise the yield of F is the yield of TERTIARY2 in E.

Two new symbols have been invented, with a proposed representation in the reference language.

9.4.1.c
  andth symbol{57b}                    ANDTH
  orel symbol{57b}                     OREL