fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
CHANGE DO - CONTINUE TO DO - ENDDO
[DO NOT] CHANGE DO [-] CONTINUE TO DO [-] ENDDO
Systematically changes labelled CONTINUE statements which terminate DO loops to labelled ENDDO statements.
If the label of the CONTINUE statement is also referenced by a GOTO statement (or by a destination label in an I/O statement or sub-program alternate return) a new label is created for the GOTO.
If the label is referenced by two or more DO loops, new labels are created and separate ENDDO statements are written.
The labels may be removed from the ENDDO statements by the command: REMOVE LABELS FROM ENDDO STATEMENTS.
The two operations, replacing DO - CONTINUE and removal of the labels, have been implemented independently because some users prefer to leave labels on long DO - ENDDO constructs so that the start and end of the construct may be identified unambiguously.
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|
DO - CONTINUE constructs are not changed by default (Note that defaults may be modified in the configuration file).
The command-line command:
$ fpt heli "%change do continue to do enddo"
results in modification of:
DO 2120 I=1,10 COL(I)=0.0 DO 2120 J=1,5 COL(I)=COL(I)+SS(I,J) 2120 CONTINUE
DO 1240 I=1,10 COL(I)=0.0 DO 1230 J=1,5 COL(I)=COL(I)+SS(I,J) 1230 ENDDO 1240 ENDDO
Copyright ©1995 to 2019 Software Validation Ltd. All rights reserved.