Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

GOTO - Unconditional

Statement: Transfers control to the same branch target statement every time it executes.

GO TO label

label

Is the label of a valid branch target statement in the same scoping unit as the GO TO statement.

The unconditional GO TO statement transfers control to the branch target statement identified by the specified label.

Example

The following are examples of GO TO statements:

  GO TO 7734
  GO TO 99999

The following shows another example:

    integer(2) in
10  print *, 'enter a number from one to ten: '
    read *, in
    select case (in)
    case (1:10)
      exit
    case default
      print *, 'wrong entry, try again'
      goto 10
    end select