Algorithmic form of an operator(Textual or Graphical in ‘92, ‘96)
NEWTYPE math
LITERALS none;
OPERATORS
fact: integer -> integer;
OPERATOR fact;
FPAR x integer;
RETURNS res integer;
DCL i integer;
START;
IF x < 0 THEN res := ERROR!
ELSE res := 1;
FOR i := 2 TO x;
res := res*i;
ENDFOR;
FI;
RETURN;
ENDOPERATOR;