fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

CHANGE WHILE - DO TO DO - WHILE

Syntax:

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

Function:

This command is used in software migration. It 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 No

Default

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

Examples

On the operating system command-line:

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