fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

SPECIFY NUMERIC SIZES

Syntax:

[DO NOT] SPECIFY NUMERIC SIZES

Function:

The declaration statements for objects of type LOGICAL, INTEGER, REAL and COMPLEX are changed throughout the program to specify the data sizes. For example, the original code:

INTEGER FUNCTION IRAN(I4) IMPLICIT INTEGER (H-Q) INTEGER*8 I8,J8 REAL RA,RB

is modified to read

INTEGER*4 FUNCTION IRAN(I4) IMPLICIT REAL*4(A-G),INTEGER*4(H-Q),REAL*4(R-Z) INTEGER*8 I8,J8 REAL*4 RA,RB

Objects for which an explicit data size has already been specified are not affected. In the example above, the INTEGER*8 declaration of I8 and J8 is not changed.

The default data sizes may be specified by the commands:

DEFAULT LOGICAL SIZE = n
DEFAULT INTEGER SIZE = n
DEFAULT REAL SIZE = n
DEFAULT COMPLEX SIZE = n

where n is an integer literal. If no specification is made, fpt uses the defaults

LOGICAL*4
INTEGER*4
REAL*4
COMPLEX*8

On systems with different default sizes (For example, the Salford PC compiler, some Alpha and AIX systems) it is recommended that specifications are written in the configuration file.

The data sizes used throughout a program may be changed by the commands

CHANGE LOGICAL SIZE TO n
CHANGE INTEGER SIZE TO n
CHANGE REAL SIZE TO n
CHANGE COMPLEX SIZE TO n

A data size for DOUBLE PRECISION may also be specified:

DEFAULT DOUBLE SIZE = n

This information is used to compute COMMON block addresses, the organisation of stuctures and derived types and the sizes of objects passed as sub-program arguments.

NOTE: Replace = by : when these commands are written on the Windows command line.

Constructs of the form INTEGER*4 are widely accepted but are not standard conforming. Use the command SPECIFY NUMERIC KINDS to insert kinds instead of sizes. The command CHANGE SIZES TO KINDS replaces the size specifications by kind specifications.

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

Example

! STATS.FSP - specification file for statistical suite. STATS.FOR ANOVA.FOR T.FOR SS.FOR WRTAB.FOR %default integer size = 8 %default real size = 8 %specify numeric sizes

See Also

CHANGE SIZE

DEFAULT SIZE

REMOVE NUMERIC SIZES

SPECIFY NUMERIC KINDS

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