An expression is a data reference or a computation, and is formed from operands, operators, and parentheses. An expression, when evaluated, produces a value, which has a type, a shape, and possibly type parameters.

An `operand` is either a scalar or an array. An
`operator` is either intrinsic or defined. A unary operation has
the form:

`operator``operand`

A binary operation has the form:

`operand`_{1}`operator``operand`_{2}

where the two operands are shape-conforming. If one operand is an array and the other is a scalar, the scalar is treated as an array of the same shape as the array, and every element of the array has the value of the scalar.

Any expression contained in parentheses is treated as a data entity. Parentheses can be used to specify an explicit interpretation of an expression. They can also be used to restrict the alternative forms of the expression, which can help control the magnitude and accuracy of intermediate values during evaluation of the expression. For example, the two expressions

(I*J)/K I*(J/K)

are mathematically equivalent, but may produce different computational values as a result of evaluation.

A `primary` is the simplest form of an expression. It can be
one of the following:

- A data object
- An array constructor
- A structure constructor
- A complex constructor
- A function reference
- An expression enclosed in parentheses

A primary that is a data object must not be an assumed-size array.

12.3 ! Constant 'ABCDEFG'(2:3) ! Subobject of a constant VAR ! Variable name (/7.0,8.0/) ! Array constructor EMP(6,'SMITH') ! Structure constructor SIN(X) ! Function reference (T-1) ! Expression in parentheses

The type, type parameters, and shape of a primary are determined as follows:

- A data object or function reference acquires the type, type parameters, and shape of the object or function reference, respectively. The type, parameters, and shape of a generic function reference are determined by the type, parameters, and ranks of its actual arguments.
- A structure constructor is a scalar and its type is that of the constructor name.
- An array constructor has a shape determined by the number of constructor expressions, and its type and parameters are determined by those of the constructor expressions.
- A parenthesized expression acquires the type, parameters, and shape of the expression.

If a pointer appears as a primary in an operation in which it is associated with a nonpointer dummy argument, the target is referenced. The type, parameters, and shape of the primary are those of the target. If the pointer is not associated with a target, it can appear only as an actual argument in a procedure reference whose corresponding dummy argument is a pointer, or as the target in a pointer assignment statement.

Given the operation `[ expr1] op expr2`, the shape
of the operation is the shape of `expr2` if `op` is unary or if
`expr1` is a scalar. Otherwise, its shape is that of
`expr1`.

The type and shape of an expression are determined by the operators and by the types and shapes of the expression's primaries. The type of the expression can be intrinsic or derived. An expression of intrinsic type has a kind parameter and, if it is of type character, it also has a length parameter.