4.1.2 Character Expressions

A character expression consists of a character operator (//) that concatenates two operands of type character. The evaluation of a character expression produces a single value of that type.

The result of a character expression is a character string whose value is the value of the left character operand concatenated to the value of the right operand. The length of a character expression is the sum of the lengths of the values of the operands. For example, the value of the character expression 'AB'//'CDE' is 'ABCDE', which has a length of five.

Parentheses do not affect the evaluation of a character expression; for example, the following character expressions are equivalent:

('ABC'//'DE')//'F'
'ABC'//('DE'//'F')
'ABC'//'DE'//'F'

Each of these expressions has the value ' ABCDEF'.

If a character operand in a character expression contains blanks, the blanks are included in the value of the character expression. For example, 'ABC '//'D E'//'F ' has a value of 'ABC D EF '.


Previous Page Next Page Table of Contents