FORTRAN Reference Manual
Introduction to Statements
FORTRAN Reference Manual—528615-001
6-5
Statement Labels
Figure 6-1 on page 6-3 shows the order in which statements can appear in your 
program.
Statement Labels
A statement label uniquely identifies a statement within a program unit and must not be 
defined more than once in that unit. A statement label consists of from one to five 
digits, ranging in value from 1 to 99999. All digits must appear in columns one to five. 
Blanks are ignored. The following examples show labels:
12334 CONTINUE <-- Valid (label is "12334")
123 4 CONTINUE <-- Valid (label is "1234")
123 45CONTINUE <-- Label is "1234"; "5" specifies that
 this line is a continuation line
A label is known only in the program unit containing it. You cannot reference it from a 
different program unit. You can label any statement, but only the FORMAT statement 
and executable statements can be referenced by other statements.
Error Numbers
The following I/O statements include an IOSTAT = ios option specifier:
BACKSPACE INQUIRE READ
CLOSE OPEN REWIND
ENDFILE POSITION WRITE
The error numbers returned in the IOSTAT = ios option specifier are different for many 
errors in FORTRAN programs compiled with ENV COMMON in effect than the error 
numbers returned to programs compiled with ENV OLD in effect.
In programs compiled with ENV OLD in effect, error numbers returned in ios are file 
system errors except error numbers 256 through 274, which are formatter error 
numbers.
In programs compiled with ENV COMMON in effect, if ios is less than 10000, the error 
number in ios is a Guardian error number. If ios is greater than 10000, the error 
number in ios corresponds to an error detected by the FORTRAN run-time library, and 
the actual error number is the value in ios minus 10000. For example, if ios is 48, the 
error returned is file system error 48, “Security Violation.” If ios is 10257, the error 
number is 257, “Invalid Parameter Value.”










