A.5 Octal Notation for Integer Constants

Octal forms of integer constants allow compatibility with PDP-11 Fortran. An octal integer constant takes the following form:

"nn
nn
Is a string of digits in the range 0 to 7.

Examples

The following examples show valid and invalid octal integer constants and explain why the invalid ones are not valid:

Valid   
"107   
"177777   
Invalid  Explanation 
"108   Contains a digit outside the allowed range 
"1377.  Contains a decimal point 
"17777"   Contains a trailing quotation mark 

These octal forms are not the same as the typeless octal constants discussed in Section 2.2.1.4. Integer constants in octal form have integer data type and are treated as integers.


Note
On Alpha processors, you must specify the compiler option VMS to use octal notation. For more information on this option, see your user manual.


Previous Page Next Page Table of Contents