forlang.hlp (Table of Contents; Topic list)
ASSIGN (Label Assignment)
                                             Up Contents Index Back
─────ASSIGN (Label Assignment)──────────────────────────────────────────────
 
     Action
 
     Assigns the value of a format or statement label to an integer
     variable.
 
     Syntax
 
     ASSIGN label TO variable
 
     Parameter          Description
 
     label              A format label or statement label, which must
                        appear in the same program unit.
 
     variable           An integer variable.
 
     Remarks
 
     If you use INTEGER*1 variables for <variable>, note that INTEGER*1
     variables can only be used for the first 128 ASSIGN statements in a
     subprogram.
 
     Example
 
     C     Assign statement label 100 to the integer variable ivar
           ASSIGN 100 TO ivar
     C     Use ivar as a FORMAT statement label
           WRITE (*, ivar)
     C     Assign statement label 200 to ivar
           ASSIGN 200 TO ivar
     C     Use ivar as the target label of an assigned GOTO statement
           GOTO ivar
           WRITE (*, *)' This is never written'
       200 CONTINUE
           WRITE (*, *)' This is written'
       100 FORMAT (' This is format 100')
           END
                                    -♦-