FPP 1L "17 May 2001" "" "Version 3.0.0" [section 12 of 17]

.-3[MACRO EXPANSION]         .-2[MESSAGE OUTPUT STATEMENTS]         .-1[OUTPUT OF fpp]
Top
.+1[DIAGNOSTICS]     .+2[SEE ALSO]         .+3[AUTHOR]


PREDEFINED SYMBOLS

Each implementation of fpp predefines a few symbols that can be tested and used in conditionals to select machine-specific code sections. The predefined symbols are provided to fpp ahead of any user-defined ones. Since later redefinitions override earlier ones, predefined symbols can always be changed by the user.

Following ISO Standard C/C++, predefined symbols always begin with two underscores, or an underscore and an uppercase letter; such names are reserved for the local implementation. Predefined symbols that do not follow this convention are forbidden. This requirement makes it possible to distinguish separate name spaces for the user and for the implementation, preventing surprises from unexpected substitutions that happen when code is moved to a new environment.

The complete set of definitions is always recorded in the output header; they can easily be displayed on stdout by giving fpp an empty input file:

fpp/dev/null

fpp always predefines exactly one major operating-system symbol:

_OS_PCDOS
_OS_TOPS20
_OS_UNIX
_OS_VAXVMS

For _OS_UNIX, exactly one minor operating-system variant may also be defined:

_AIX
_AIX370
_BSD
_DARWIN
_FREEBSD
_GOULD
_HPUX
_IRIX
_LINUX
_MACH
_MIPS
_NETBSD
_OPENBSD
_OSF1
_RHAPSODY
_STARDENT
_SUNOS
_ULTRIX

Additional architectural variants may be defined on some systems:

_GNU_LINUX
_HPPA
_IBM_3090
_IBM_PS_2
_IBM_RS_6000
_IBM_RT
_IRIX64
_M68K
_MACOSX
_NEXT
_POSIX
_PPC
_STARDENT_1500
_STARDENT_3000
_SUN3
_SUN386
_SUN4
_VAX
_X86
The operating system name as returned by uname(1) is recorded as the value of _OS_NAME, after collapsing characters other than letters, digits, period, and hyphen to underscores.

The operating system level, usually a string of digits separated by periods and/or hyphens, is recorded as the value of _OS_LEVEL. On most systems, it too is obtained from uname(1).

The host CPU architecture is recorded as the value of _ARCH, one of

Alpha
Convex
Cray
Gould
IA-64
IBM-3090
MIPS
Motorola-68K
PA-RISC
PowerPC
SPARC
Stardent
VAX
unknown
x86

Host byte addressing order is defined by one of these:

_BIG_ENDIAN
_LITTLE_ENDIAN

Big-endian addressing is used by IBM, Motorola, and most RISC systems. Little-endian addressing is used by the Intel x86, HP/Intel IA-64, DEC VAX, and Compaq/DEC Alpha architectures. Although a few RISC architectures support both endian orders, a fixed choice is always made by the operating system to ensure consistent byte ordering in binary files and network traffic.

Host floating-point architecture must be defined by

_IEEE_754
on those machines that have IEEE 754 floating-point arithmetic.

If the Fortran implementation supports NAMELIST I/O, the symbol

_NAMELIST
must be defined.

To ensure standardization, all such names must be registered with the author of fpp, and will be listed in these manual pages.

Following ISO Standard C/C++, four standard permanent symbols are always defined; these each have two leading and two trailing underscores. Permanent symbols always begin with two underscores, and once defined, may not be undefined, or redefined, by the user.

__DATE__
Current calendar date in the form Mmm dd yyyy. The month field is alphabetic, and the day number field has a leading blank if the day is less than 10.
__FILE__
Current input file filename.
__LINE__
Current input file line number.
__TIME__
Wall-clock time in the form hh:mm:ss.

In addition to those four, fpp sets two related values:

__ISO_DATE__
Ten-character ISO 8601 date in the form YYYY-MM-DD.
__TIMEZONE__
Three-letter time zone abbreviation, such as MDT for Mountain Daylight Time, or GMT for Greenwich Mean Time.

The symbols __DATE__, __ISO_DATE__, __TIME__, and __TIMEZONE__ are set only once, at the start of execution of fpp. These values can be conveniently used to generate output stamped with the time of compilation:

C     WRITE (*,*) 'Processed on #(__DATE__) at #(__TIME__) 
#(__TIMEZONE__)'
      WRITE (*,*) 'Processed on ??? ?? ???? at ??:??:?? ???'

might produce

C     WRITE (*,*) 'Processed on #(__DATE__) at #(__TIME__) 
#(__TIMEZONE__)'
      WRITE (*,*) 'Processed on Dec 10 1990 at 09:10:07 MST'
C-fpp-      WRITE (*,*) 'Processed on ??? ?? ???? at ??:??:??
 ???'


.-3[MACRO EXPANSION]         .-2[MESSAGE OUTPUT STATEMENTS]         .-1[OUTPUT OF fpp]
Top
.+1[DIAGNOSTICS]     .+2[SEE ALSO]         .+3[AUTHOR]