FORTRAN 77 Language Reference

Alternate Notation for Typeless Constants

For compatibility with other versions of FORTRAN, the following alternate notation is allowed for octal and hexadecimal notation. This alternate does not work for binary, nor does it work in DATA or PARAMETER statements.

For an octal notation, enclose a string of octal digits in apostrophes and append the letter O.

Example: Octal alternate notation for typeless constants:


	'37'O
	37'O				Invalid -- missing initial apostrophe
	'37'				Not numeric -- missing letter O
	'397'O				Invalid -- invalid digit

For hexadecimals, enclose a string of hex digits in apostrophes and append the letter X.

Example: Hex alternate notation for typeless constants:


	'ab'X 
	3fff'X 
	'1f'X 
	'1fX					Invalid-missing trailing apostrophe 
	'3f'					Not numeric- missing X
	'3g7'X					Invalid-invalid digit g

Here are the rules and restrictions for binary, octal, and hexadecimal constants: