FPT and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Reference Manual Home |
Syntax:
REPRESENT TRUE BY LEAST SIGNIFICANT BIT REPRESENT TRUE BY LSB REPRESENT TRUE BY SIGN BIT |
Function:
The command CORRECT USE OF INTEGER FOR LOGICAL instructs FPT to searche the code for instances of integer variables which are used to control logical IF statements. These are modified to logical expressions. The way in which the statements are modified depends on the commands:
REPRESENT TRUE BY LEAST SIGNIFICANT BIT
or
REPRESENT TRUE BY SIGN BIT
as shown in the examples below.
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:
REPRESENT TRUE BY LEAST SIGNIFICANT BIT
(Note that defaults may be changed in the configuration file).
Examples:
The code:
STATUS=LIB$GET_LUN(ICH) IF (.NOT. STATUS) CALL LIB$SIGNAL(%VAL(STATUS))
where STATUS is an integer variable, is corrected:
when REPRESENT TRUE BY LEAST SIGNIFICANT BIT is selected:
STATUS=LIB$GET_LUN(ICH) IF (.NOT. (IAND(STATUS,1) .NE. 0)) CALL LIB$SIGNAL(%VAL(STATUS))
when REPRESENT TRUE BY SIGN BIT is selected:
STATUS=LIB$GET_LUN(ICH) IF (.NOT. (STATUS .LT. 0)) CALL LIB$SIGNAL(%VAL(STATUS))
See Also:
CORRECT USE OF INTEGER FOR LOGICAL
Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.