2.11 Backward compatibility

2.11.4 Reference pages

nodeclare Loop Construct

Syntax:nodeclare var-list

Thenodeclare construct prevents the Loop Facility from generating a default type specification for the specified variables.

If a variable that is listed in the var-list argument is given a data type in another loop construct, it is correctly initialized for the specified type, but no declaration is generated.

;; Sum a few numbers into a local (nontyped) variable.  By
;; default, the Loop Facility would declare this variable to be of
;; type number. The NODECLARE construct prevents automatic
;; generation of this type declaration.
> (loop
    nodeclare (sumvar)      ; Don't generate a type declaration.
    for i in '(1.0 2.0)
    do (print sumvar)
    ;; Initialize SUMVAR as if it were type float.
    sum i into sumvar float) 
0.0
1.0 
NIL


The Loop Facility - 9 SEP 1996

Generated with Harlequin WebMaker