fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

CHANGE LOGICAL*1 TO INTEGER*1

Syntax:

[DO NOT] CHANGE LOGICAL*1 TO INTEGER*1

Function:

All declarations of type and size LOGICAL*1 are changed to INTEGER*1. fpt accepts the use of integer variables in logical contexts without flagging an error. Declarations of the form LOGICAL(1) or LOGICAL(KIND=1) are not affected. This is a migration issue, and the legacy codes for which it applies were not written in modern Fortran style.

The use of variables declared LOGICAL(1) to hold small integers is surprisingly common in legacy codes. The authors do not know why this practice occurred. Many old compilers did not differentiate between logical and integer data types, and no error usually resulted. The DEC legacy compilers, VMS, CVF, HP-UX, ifort and ifx allow integer variables to be used as logicals, and for these compilers the change is safe.

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

The change is not made by default.

(Note that defaults may be changed in the configuration file)

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