# A.13 Alternative Syntax for Character Constants (Alpha only)

On Alpha processors, you can use the following form for a character constant:

    "c1c2c3 . . . cn"

cn
  Is a printable ASCII character or control character.

Rules and Behavior

Both delimiting quotation marks are required.

Within a character constant, the quotation mark character is represented by two consecutive quotation marks with no space or other character between them ("").

In list-directed sequential WRITE statements, character constants are transferred without delimiting quotation marks and each internal quotation mark is represented by only one quotation mark instead of two (apostrophes are not reduced within quotation marks). Consequently, records containing list-directed character output data can be printed but not used for list-directed input.

Examples

The following examples show valid and invalid character constants:

Valid |
"Please press ""Y"" or ""N""" |
"Today's weather is: " |

Invalid | Explanation
--- | ---
"Type 'T' or 'F' | No trailing quotation mark

For More Information:

For more details on character constants, see Section 2.2.1.6.

Previous Page Next Page Table of Contents