FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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. Labels are not removed if two or more DO loops terminate on the same label, or if the label is also a destination label of a GOTO (or alternate return, arithmetic IF etc.). The labels must first 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.

Example:

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 2014 Software Validation Ltd. All rights reserved.