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;
- reals contain a decimal point and can be represented in exponential form
- reals and integers may contain + or -.
- 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;
- 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
Adam Marshall ©University of Liverpool, 1996
Fri Dec 6 18:56:08 GMT 1996Not for commercial use.