READ - sequential formatted

READ - sequential formatted

UNIT=<value>
<value> specifies the unit number. The keyword and equals sign are optional, if this is the first item in the list of specifiers.

FMT=<string, label or *>
Specifies the format in which the data will be read. The keyword is optional if this is the second item in the list of specifiers.

IOSTAT=<variable>
<variable> will contain zero if the operation was successful, otherwise a positive value to indicate an error, -1 to indicate EOF or -2 to indicate EOR.

ERR=<label>
<label> specifies a label to go to in the event of an error.

END=<label>
<label> specifies a label to go to on end of file.

ADVANCE=<string>
<string> should be set to 'NO' for non-advancing input, 'YES' or absent for advancing input.

SIZE=<variable>
<variable> will contain the number of characters actually read (non-advancing only).

EOR=<label>
<label> specifies a label to go to on end of record (non-advancing).

Reading tab characters
In an FTN95 READ statement, by default, tab characters read from a file are converted to spaces. To avoid this conversion of tabs you should make a call to the subroutine READ_TABS@(unitno) immediately after the OPEN statement (unitno is the unit number of the stream).

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited