Next: Real Constants
Up: Constants
Previous: Constants
The general form of an integer constant is a sign (plus or minus)
followed by a string of one or more digits. All other characters
(except blanks) are prohibited. If the number is positive the plus
sign is optional. Here are some examples of valid integer
constants:
-100 42 0 +1048576
It is easier to read a large number if its digits are marked off in
groups of three: traditionally the comma (or in some countries the
dot) is used for this purpose. The blank can be used in the same
way in Fortran programs (but not in data files):
-1 000 000 000
Note that this number, although conforming to the rules of Fortran,
may be too large in magnitude to be stored as an integer on some
systems.
Helen Rowlands
8/27/1998