FORTRAN 77 Language Reference

Integer Constants

An integer constant consists of an optional plus or minus sign, followed by a string of decimal digits.


Example: Integer constants:

-2147483649 							Invalid-too small, error message 
2.71828 							Not INTEGER-decimal point not allowed 
1E6							Not INTEGER-E not allowed 
29,002 							Invalid-comma not allowed, error message 
2147483648 							Invalid- too large, error message 

Alternate Octal Notation @

You can also specify integer constants with the following alternate octal notation. Precede an integer string with a double quote (") and compile with the -xl option. These are octal constants of type INTEGER.

Example: The following two statements are equivalent:

	JCOUNT = ICOUNT + "703 

You can also specify typeless constants as binary, octal, hexadecimal, or Hollerith. See "Typeless Constants (Binary, Octal, Hexadecimal) ".

Long Integers @

Compiling with an option that promotes the range from INTEGER*4(-21474836, 21474836) to INTEGER*8 (-9223372036854775808, 9223372036854775807). The integer constant is stored or passed as an 8-byte integer, data type INTEGER*8.

Short Integers @

If a constant argument is in the range (-32768, 32767), it is usually widened to a 4-byte integer, data type INTEGER*4; but compiling with the -i2 option will cause it to be stored or passed as a 2-byte integer, data type INTEGER*2.