Download Fortran User`s Guide - Oracle Documentation

Transcript
Examples: Octal and hexadecimal in assignment statements.
i = 1357B
j = X"28FF"
k = X'-5A'
Use of an octal or hexadecimal constant in an arithmetic expression can produce
undefined results and do not generate syntax errors.
Alternate Contexts of Boolean Constants
f95 allows BOZ constants in the places other than DATA statements.
B’bbb’
O’ooo’
Z’zzz’
B"bbb"
O"ooo"
Z"zzz"
If these are assigned to a real variable, no type conversion occurs.
Standard Fortran allows these only in DATA statements.
Abbreviated Size Notation for Numeric Data
Types
f95 allows the following nonstandard type declaration forms in declaration
statements, function statements, and IMPLICIT statements.
TABLE C-2
142
Size Notation for Numeric Data Types
Nonstandard
Declarator
Short Form
Meaning
INTEGER*1
INTEGER(KIND=1)
INTEGER(1)
One-byte signed integers
INTEGER*2
INTEGER(KIND=2)
INTEGER(2)
Two-byte signed integers
INTEGER*4
INTEGER(KIND=4)
INTEGER(4)
Four-byte signed integers
LOGICAL*1
LOGICAL(KIND=1)
LOGICAL(1)
One-byte logicals
LOGICAL*2
LOGICAL(KIND=2)
LOGICAL(2)
Two-byte logicals
LOGICAL*4
LOGICAL(KIND=4)
LOGICAL(4)
Four-byte logicals
REAL*4
REAL(KIND=4)
REAL(4)
IEEE single-precision
floating-point (Four-byte)
Fortran User’s Guide • May 2000