NOSTANDARD Directive [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Reference
NOSTANDARD Directive
The NOSTANDARD directive specifies options for compatibility with
industry standard non-HP FORTRAN 77 programs.
Syntax
[CHARS ]
[LOGICALS ]
$NOSTANDARD [IO ] [ON ]
[SYSTEM ] [OFF]
[INTRINSICS]
[OPEN ]
Default Off.
If NOSTANDARD is specified without options, all
options are ON.
Location The LOGICALS, SYSTEM, INTRINSICS, and OPEN options
must appear before any nondirective statements in
the program unit, including the program head.
However, the CHARS and IO options are allowed
anywhere in the program unit.
Toggling/ Duration CHARS and IO apply until another NOSTANDARD
directive changes them.
CHARS Option
By default, the compiler passes character items by descriptor. That is,
the address of the item is passed by reference immediately followed by
the length of the item passed by value. The CHARS option causes the
length parameter to be passed at the end of the parameter list by value.
This option is provided for migrating programs that have character
passing incompatibilities with HP FORTRAN 77. The NOSTANDARD CHARS
directive is allowed anywhere in the program unit.
LOGICALS Option
The LOGICALS option causes the compiler to treat logicals as two whole
bytes for LOGICAL*2 and four whole bytes for LOGICAL*4. The value .TRUE.
is represented by -1 and the value .FALSE. is represented by zero. If
this option is not specified, by default HP FORTRAN 77 uses only one byte
to store the logical .TRUE. or .FALSE. value, even if LOGICAL*2 or
LOGICAL*4 is specified.
NOTE You can specifiy LOGICAL or LOGICALS for this option.
IO Option
When using character format descriptors A[w] or R[w] with integer and
real data types, the IO option causes data to be output in reverse order,
starting at the right and progressing left. For more information, see
"Character Format Descriptors (A, R)" . The NOSTANDARD IO option is
allowed anywhere in the program unit.
SYSTEM Option
Several intrinsic functions are available through the NOSTANDARD
directive. They include:
------------------------------------------------------------------
| | |
| DATE | Returns a string in the form dd-mm-yy, such as |
| | 15-09-88. |
| | |
------------------------------------------------------------------
| | |
| IDATE | Returns 3 integer values representing the |
| | current month, day, and year. |
| | |
------------------------------------------------------------------
| | |
| EXIT | Terminates the program as if a STOP statement |
| | without an argument has been encountered. |
| | |
------------------------------------------------------------------
| | |
| RAN | A random number generator of the multiplicative |
| | congruential type that returns a floating-point |
| | number in the range between 0.0 and 1.0 |
| | exclusively. |
| | |
------------------------------------------------------------------
| | |
| SECNDS | Returns the number of seconds elapsed since |
| | midnight minus the number of seconds passed as |
| | an argument. |
| | |
------------------------------------------------------------------
| | |
| TIME | Returns a string in the form hh:mm:ss, such as |
| | 22:10:30. |
| | |
------------------------------------------------------------------
NOTE Functions RAN and SECNDS cannot be used with the $HP3000_16 ON
directive. This directive causes the floating-point format to be
classic HP 3000 instead of IEEE, and will not be recognized by
these functions. The compiler attempts to find a compatibility
mode routine for these which does not exist.
For information on these intrinsics, see "FORTRAN Intrinsic Functions and
Subroutines" .
INTRINSICS Option
This directive allows the 9000 Series 800 to return an INTEGER*2 when
$SHORT is enabled, but an INTEGER*4 when $SHORT is not enabled (like on
the 9000 Series 300 and other vendors' FORTRAN compilers).
* INT
* IFIX
* IDINT
* IQINT
* IDNINT
* IQNINT
* MAX1
* MIN1
* ZEXT
OPEN Option
The OPEN option allows multiple OPENs of the same file with different
unit numbers. By default, multiple OPENs of the same file cause a run
time error.
$NOSTANDARD OPEN ON
program main
C connect DataFile to unit 10
OPEN(10,FILE='DataFile')
C connect DataFile to unit 20 for reading only
C Note: without NOSTANDARD OPEN ON, this would
C cause an error at runtime
OPEN(20,FILE='DataFile',READONLY)
STOP
END
MPE/iX 5.0 Documentation