Previous

4.5. Operation declarations

{Operation-declarations provide defining-operators.

Example:

OP MC = (REAL a,b)REAL : (3 * a < b | a | b ). Unlike the case with, e.g., identifier-declarations, more than one operation-declaration involving the same TAO-token may occur in the same reach; e.g., the previous example may very well be in the same reach as

OP MC = (COMPL carthy,john)COMPL: (random < .5 | carthy | john);the operator MC is then said to be "overloaded".}

4.5.1. Syntax

A) PRAM :: DUO ; MONO.

B) TAO :: TAD ; TAM.

a) NEST MODINE operation declaration of DECS{41a } : operator{94d } token, formal MODINE NEST plan{b,46p,-}, NEST MODINE operation joined definition of DECS{41b,c } .

b) formal routine NEST plan{a} : EMPTY.

c) NEST MODINE operation definition of PRAM TAO{41c } : PRAM NEST defining operator with TAO{48a } , is defined as{94d } token, PRAM NEST source for MODINE{44d } . {Examples:

}

a)
OP ¦ = (BOOL a, b)BOOL: (a | TRUE | b)
c)
¦ = (BOOL a, b)BOOL: (a | TRUE | b )

4.5.2. Semantics

a) The elaboration of an operation-declaration consists of the collateral elaboration of its constituent operation-definitions.

b) An operation-definition is elaborated by ascribing {4.8.2.a } the routine yielded by its source-for-MODINE to its defining-operator.
 
Next