02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GO TO (assigned)<br />

Transfers control to a variable that was assigned a label.<br />

Syntax<br />

GO TO integer-variable [[,] (label-list)]<br />

integer-variable is a scalar variable of default type integer.<br />

label-list is a list of statement labels, separated by commas.<br />

Description<br />

<strong>HP</strong> <strong>Fortran</strong> statements<br />

GO TO (assigned)<br />

The assigned GO TO statement transfers control to the statement whose label was most<br />

recently assigned to a variable with the ASSIGN statement.<br />

integer-variable must be given a label value of an executable statement through an<br />

ASSIGN statement prior to execution of the GO TO statement. When the assigned GO TO<br />

statement is executed, control is transferred to the statement whose label matches the label<br />

value of integer-variable.<br />

label-list is a list of labels that integer-variable might assume.<br />

integer-variable must not be an array element or an integer component of a derived type.<br />

The use of this statement can hinder the ability of the compiler to optimize the program in<br />

which it occurs.<br />

Examples<br />

ASSIGN 10 TO out<br />

GO TO out<br />

Related statements<br />

ASSIGN, GO TO (computed), and GO TO (unconditional)<br />

Related concepts<br />

For information about flow control statements, see “Flow control statements” on page 113.<br />

Chapter 10 331

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!