fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |





fpt generates a listing of all COMMON blocks. The listing is organised by COMMON block address and shows the variables at each COMMON block address in each sub-program.

The organisation of COMMON blocks depends on the data sizes of the objects within them. The data size of an object is the number of bytes (or other machine units) which each element of the object occupies in memory. For example, the data size of an integer or a real is typically 4 bytes, the data size of a double precision variable is typically 8 bytes. These sizes may be specified by the commands DEFAULT LOGICAL SIZE, DEFAULT INTEGER SIZE etc. and the commands CHANGE LOGICAL SIZE, CHANGE INTEGER SIZE etc.

Some Fortran systems pack successive objects into COMMON blocks without regard to the memory alignment of the objects. Others automatically align the objects to addresses which are multiples of, typically, 4 or 8 bytes, leaving spaces after shorter objects. fpt can reproduce this behaviour. The appropriate commands are ALIGN OBJECTS IN COMMON BLOCKS and COMMON ALIGNMENT GRANULARITY.

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



(Note that defaults may be changed in the configuration file)


The COMMON block listing for the example program milatc is shown below. Note the error caused by the unused variable BERR1 in /PATCOM/ at address 24016.

COMMON Block Address Allocation =============================== (fpt command: common block listing) COMMON DEVCOM 4 bytes Address Sub-progs Name Type Size Bounds Access ------- --------- ---- ---- ---- ------ ------ 0 MILATC,DEVIAT IRAN INTEGER *4 df R W COMMON PATCOM 24048 bytes Address Sub-progs Name Type Size Bounds Access ------- --------- ---- ---- ---- ------ ------ 0 PATHS CPATH REAL *4 (1:3,1:1000) - W 0 MILATC CPATH REAL *4 df (1:3,1:1000) R - 12000 PATHS MPATH REAL *4 (1:3,1:1000) - W 12000 MILATC MPATH REAL *4 df (1:3,1:1000) R - 24000 MILATC,PATHS V1 REAL *4 df R W 24004 MILATC,PATHS V2 REAL *4 df R W 24008 MILATC,PATHS C1 REAL *4 df R W 24012 MILATC,PATHS C2 REAL *4 df R W 24016 PATHS BEAR1 REAL *4 df R - 24016 MILATC BERR1 REAL *4 df Unused 24020 MILATC,PATHS BEAR2 REAL *4 df R W 24024 MILATC,PATHS X1 REAL *4 df R W 24028 MILATC,PATHS Y1 REAL *4 df R W 24032 MILATC,PATHS Z1 REAL *4 df R W 24036 MILATC,PATHS X2 REAL *4 df R W 24040 MILATC,PATHS Y2 REAL *4 df R W 24044 MILATC,PATHS Z2 REAL *4 df R W *******************************************************************************

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