FPT and WinFPT Reference Manual - Command-line Commands

### UNITS

Syntax:

 UNITS [:] :: {, }

Function:

Specifies the physical units of the named symbols. The units name is written as the quoted string. The symbols must be real or complex, and may be scalar or array objects. The units are used to report the names of the units by the SHOW UNITS and CHECK UNITS commands.

The symbol may be specified:

1. Simply by name, e.g. gamma, in which case all symbols in the code named gamma will have the specified units;

2. By COMMON block and name, e.g. /coeffs/gamma, in which case only the named symbol in the COMMON block will have the specified units;

3. By sub-program name and name, e.g. aero\gamma, in which case the variable gamma in the sub-program aero, and, if the variable is public in a module or in COMMON, in all other routines in which it occurs, will have the specified units.

All lives of the specified variables will have the units specified (Please see the SHOW LIVES command).

Note that the names of units are case-sensitive.

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:

! heli_units.fsp  23-Jun-07  BTF
% units : "seconds" :: time, dt