# Binary Constants

A binary constant is an alternative way to represent a numeric constant. A binary constant takes one of the following forms:

B'd[d...]'

B"d[d...]"

# Octal Constants

An octal constant is an alternative way to represent numeric constants. An octal constant takes one of the following forms:

O'd[d...]'

O"d[d...]"

A hexadecimal constant is an alternative way to represent numeric constants. A hexadecimal constant takes one of the following forms:

Z'd[d...]'

Z"d[d...]"

# Hollerith Constants

A Hollerith constant is a string of printable ASCII characters preceded by the letter H. Before the H, there must be an unsigned, nonzero default integer constant stating the number of characters in the string (including blanks and tabs).

# Determining the Data Type of Nondecimal Constants

Binary, octal, hexadecimal, and Hollerith constants have no intrinsic data type. In most cases, the default integer data type is assumed.

# Enumerations and Enumerators

An enumeration defines the name of a group of related values and the name of each value within the group. It takes the following form:

ENUM, BIND(C)

ENUMERATOR [ :: ] c1 [= expr][, c2 [= expr]]...

# Variables

A variable is a data object whose value can be changed at any point in a program. A variable can be any of the following:

• A scalar

# Data Types of Scalar Variables

The data type of a scalar variable can be explicitly declared in a type declaration statement. If no type is declared, the variable has an implicit data type based on predefined typing rules or definitions in an IMPLICIT statement.

An explicit declaration of data type takes precedence over any implicit type. Implicit type specified in an IMPLICIT statement takes precedence over predefined typing rules.

# Specification of Data Type

Type declaration statements explicitly specify the data type of scalar variables. For example, the following statements associate VAR1 with a 16-byte complex storage location, and VAR2 with an 8-byte double-precision storage location:

# Implicit Typing Rules

By default, all scalar variables with names beginning with I, J, K, L, M, or N are assumed to be default integer variables. Scalar variables with names beginning with any other letter are assumed to be default real variables. For example: