FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


SPECIFY NUMERIC SIZES

Syntax:

[DO NOT] SPECIFY NUMERIC SIZES

Function:

Code is added to make explicit the current default data sizes for LOGICAL, INTEGER, REAL and COMPLEX objects used throughout the program. For example, the original code:

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

might be 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 integer. 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 default data sizes for DOUBLE PRECISION may also be specified:

   DEFAULT DOUBLE SIZE = n

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

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

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


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


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