RCSNUSP/COBOL: Difference between revisions

m
Fixed bugs.
m (Corrected copybook name.)
m (Fixed bugs.)
Line 327:
DISPLAY "The program will terminate."
GOBACKSTOP RUN
.
END DECLARATIVES.
Line 333:
OPEN INPUT code-file
PERFORM VARYING line-idx FROM 1 BY 1 UNTIL end-of-code-file
ADD 1 TO num-lines
READ code-file INTO code-lines (line-idx)
NOT AT END
ADD 1 TO num-lines
AT END
SUBTRACT 1 FROM num-lines
EXIT PERFORM
END-READ
Anonymous user