Next: Implicit Typing
Up: Data Objects
Previous: Intrinsic Types
A literal constant is an entity with a fixed value:
+12345 ! INTEGER
2. ! REAL
1.0 ! REAL
-6.6E-06 ! REAL
-6.6D-06 ! DOUBLE PRECISION
.FALSE. ! LOGICAL
'Mau''dib' ! CHARACTER
"Mau'dib" ! CHARACTER
Note,
- there are only two LOGICAL values.
- integers are represented by a sequence of digits with a + or
- sign, + signs are optional.
- REAL constants contain a decimal point or an exponentiation
symbol, INTEGER constants do not.
- character literals are delimited by the double or single quote
symbols, " and '.
- two occurrences of the delimiter inside a string produce one
occurrence on output; for example 'Mau''dib' but not
"Mau''dib" because of the differing delimiters;
- there is only a finite range of values that numeric literals can
take.
- constants may also include a kind specifier.
Return to corresponding overview page
Next: Implicit Typing
Up: Data Objects
Previous: Intrinsic Types
©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997Not for commercial use.