fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

SPECIFY NUMERIC KINDS

Syntax:

[DO NOT] SPECIFY NUMERIC KINDS

Function:

Declaration statements for LOGICAL, INTEGER, REAL and COMPLEX objects throughout the program are modified to show the kinds of the objects. Existing size specifications of the form INTEGER*4 are changed to show the corresponding kinds. 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(KIND=ki4) FUNCTION IRAN(I4) ! USE fpt_module_kinds ! IMPLICIT REAL(KIND=kr4)(A-G),INTEGER(KIND=ki4)(H-Q),REAL(KIND=kr4)(R-Z) INTEGER(KIND=kr8) I8,J8 REAL(KIND=kr4) RA,RB

The specifier "KIND =" may be suppressed by the comand: DO NOT WRITE KIND EQUAL IN DECLARATION STATEMENTS.

The default IMPLICIT construct may be changed to IMPLICIT NONE by the command SPECIFY IMPLICIT NONE.

The kind values are parameterised, and the kind parameters are declared in the module fpt_module_kinds. This module is generated automatically by fpt in the file fpt_module_kinds.f90 (the file name extension may be changed). By default, the kind names are:

LOGICAL: kl1, kl2, kl4, kl8 and kl16 for 1, 2, 4, 8 and 16 byte logicals;
INTEGER: ki1, ki2, ki4, ki8 and ki16 for 1, 2, 4, 8 and 18-byte integers;
REAL: kr4, kr8, kr10 and kr16 for 4, 8, 10 and 16-byte reals
COMPLEX: Complex objects use the corresponding REAL kinds.

The default kind names may be replaced by the commands: DELETE KIND and DEFINE KIND.

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

See Also

DEFINE KIND

DELETE KIND

SPECIFY IMPLICIT NONE

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