?NF

Syntax

── ? ──<mix number>── NF ──────────────────────────────────────────────%

Explanation

The ?NF command can be used to respond to a “NO FILE” message. A “NO FILE” message is displayed when a file is sought whose OPTIONAL file attribute is set to FALSE. A ?NF reply returns an error result value of NOFILEFOUNDRSLT (2) to the user program and allows the program, if it is so designed, to handle the error condition without being terminated. If a mix number is not specified, the currently running program is assumed.

Example

LIST
100 BEGIN
200 FILE F(KIND=TAPE);
300 INTEGER I;
350
400 I:= OPEN(F);
500 DISPLAY(STRING(I,*));
600 END.
#

RUN
#RUNNING 6392
#6392 NO FILE F (MT) #1
 ?NF
#6392 GOING
#6392 DISPLAY:2.
#ET=6.9 PT=0.3 IO=0.4