fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

REMOVE LABELS FROM ENDDO STATEMENTS

Syntax:

[DO NOT] REMOVE LABELS FROM ENDDO [STATEMENTS]
[DO NOT] REMOVE LABELS FROM END DO [STATEMENTS]

Function:

Systematically removes labels from ENDDO statements, and from the corresponding DO statements. If labels are to be removed from constructs where two or more DO loops terminate on the same label, or where the label is also a destination label of a GOTO (or alternate return, arithmetic IF etc.), the labels must be separated by specifying:

SEPARATE DO AND GOTO DESTINATION LABELS

DO loops which terminate on labelled CONTINUE statements may be replaced by un-labelled DO - ENDDO constructs by specifying both

CHANGE DO - CONTINUE TO DO - ENDDO
and
%REMOVE LABELS FROM ENDDO STATEMENTS

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

Labels are not removed by default.

Examples

The code:

DO 2120 I=1,10 COL(I)=0.0 DO 2120 J=1,5 COL(I)=COL(I)+SS(I,J) 2120 ENDDO

is converted by the commands:

%CHANGE DO-CONTINUE TO DO-ENDDO %REMOVE LABELS FROM ENDDO STATEMENTS

to:

DO I=1,10 COL(I)=0.0 DO J=1,5 COL(I)=COL(I)+SS(I,J) ENDDO ENDDO

See Also

CHANGE DO-CONTINUE TO DO-ENDDO

SEPARATE DO AND GOTO DESTINATION LABELS

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