FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


CHANGE WHILE - DO TO DO - WHILE

Syntax:

[DO NOT] CHANGE WHILE [-] DO TO DO [-] WHILE

Function:

Systematically changes WHILE - DO constructs to DO WHILE constructs.

WHILE DO is supported under Salford FTN77 Fortran.

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:

WHILE - DO constructs are not changed by default (Note that defaults may be modified in the configuration file).

Example:

$ fpt heli "%change while do to do while"

results in modification of:

WHILE (A(I) .NE. -9999) DO SS(I) = SS(I) + A(I)*A(I) I = I + 1 ENDWHILE

to:

! FPT WHILE (A(I) .NE. -9999) DO !-----------^------------------------------------------------- !!! FPT - 2405 'WHILE - DO' replaced by 'DO WHILE' !------------------------------------------------------------- DO WHILE (A(I) .NE. -9999) SS(I) = SS(I) + A(I) * A(I) I = I + 1 ! FPT ENDWHILE !--------------^---------------------------------------------- !!! FPT - 2405 'WHILE - DO' replaced by 'DO WHILE' !------------------------------------------------------------- ENDDO


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