fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

REMOVE LABELS FROM EXECUTABLE STATEMENTS

Syntax:

[DO NOT] REMOVE LABELS FROM EXECUTABLE STATEMENTS

Function:

Systematically moves statement labels from executable statements to CONTINUE statements. There are three cases:

Labelled statements where the label is un-referenced or referenced by GOTO:

The labelled CONTINUE statement is written before the original labelled statement, for example:

IF (I .GE. 0) GOTO 100 I=0 100 I=I+1

becomes:

IF (I .GE. 0) GOTO 100 I=0 100 CONTINUE I=I+1

Labelled statements where the label is referenced by a DO statement:

The labelled CONTINUE statement is written after the original statement, for example:

DO 100 I=1,100 100 C(I)=A(I)

becomes

DO 100 I=1,100 C(I)=A(I) 100 CONTINUE

Labelled statements where the label is referenced by both DO and GOTO:

A new label is created and all statement labels are re-numbered. For example:

DO 100 I=1,100 IF (C(I) .GT. 0) GOTO 100 C(I)=ABS(C(I)) 100 S=S+C(I)

becomes

DO 2220 I=1,100 IF (C(I) .GT. 0) GOTO 2210 C(I)=ABS(C(I)) 2210 CONTINUE S=S+C(I) 2220 CONTINUE

Similarly, the construct which is legal on some systems

IF (LF) GOTO 100 DO 100 I=1,100 100 S=S+C(I)

becomes

IF (LF) GOTO 3730 DO 3720 I=1,100 S=S+C(I) 3720 CONTINUE 3730 CONTINUE

These are the cases which are handled specifically by the command SEPARATE DO AND GOTO DESTINATION LABELS. The re-numbering of statement labels is carried out as described for the command RENUMBER LABELS.

Where to Use this Command

Operating system command line Yes
Configuration file, config.fsp Yes
Specification (fsp) files, *.fsp Yes
Interactively, to FPT> prompt Yes
Interactive command files Yes
Embedded in the Fortran code Yes

Default

Statement labels are not moved by default.

See Also

RENUMBER LABELS

SEPARATE DO AND GOTO DESTINATION LABELS

Copyright ©1995 to 2025 Software Validation Ltd. All rights reserved.