Next: Implicit Typing
Up: Data Objects
Previous: Intrinsic Types
A literal constant is an entity with a fixed value:
12345 ! INTEGER
1.0 ! REAL
-6.6E-06 ! REAL: -6.6*10**(-6)
.FALSE. ! LOGICAL
.TRUE. ! LOGICAL
"Mau'dib" ! CHARACTER
'Mau''dib' ! CHARACTER
Note,
- there are only two LOGICAL values;
- REAL s contain a decimal point, INTEGER s do not,
- REAL s have an exponential form
- character literals delimited by " and ';
- two occurrences of the delimiter inside a string produce one
occurrence on output;
- there is only a finite range of values that numeric literals can
take.
For more information, click here
Next: Implicit Typing
Up: Data Objects
Previous: Intrinsic Types
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.