2.1. Character Set

[UP][NEXT]

The only characters allowed in the text of a program are the graphic characters and format effectors. Each graphic character corresponds to a unique code of the ISO seven-bit coded character set (ISO standard 646), and is represented (visually) by a graphical symbol. Some graphic characters are represented by different graphical symbols in alternative national representations of the ISO character set. The description of the language definition in this standard reference manual uses the ASCII graphical symbols, the ANSI graphical representation of the ISO character set.

    graphic_character ::= basic_graphic_character
       | lower_case_letter | other_special_character 

    basic_graphic_character ::=
         upper_case_letter | digit
       | special_character | space_character 

    basic_character ::=
         basic_graphic_character | format_effector 

The basic character set is sufficient for writing any program. The characters included in each of the categories of basic graphic characters are defined as follows:

  1. upper case letters

    A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

  2. digits

    0 1 2 3 4 5 6 7 8 9

  3. special characters

    " # & ' ( ) * + , - . / : ; < = > _ |

  4. the space character

Format effectors are the ISO (and ASCII) characters called horizontal tabulation, vertical tabulation, carriage return, line feed, and form feed.

The characters included in each of the remaining categories of graphic characters are defined as follows:

  1. lower case letters

    a b c d e f g h i j k l m n o p q r s t u v w x y z

  2. other special characters

    ! $ % ? @ [ \ ] ^ ` { } ~

Allowable replacements for the special characters vertical bar (|), sharp (#), and quotation (") are defined in section 2.10.

Notes:

The ISO character that corresponds to the sharp graphical symbol in the ASCII representation appears as a pound sterling symbol in the French, German, and United Kingdom standard national representations. In any case, the font design of graphical symbols (for example, whether they are in italic or bold typeface) is not part of the ISO standard.

The meanings of the acronyms used in this section are as follows: ANSI stands for American National Standards Institute, ASCII stands for American Standard Code for Information Interchange, and ISO stands for International Organization for Standardization.

The following names are used when referring to special characters and other special characters:

    symbol     name                        symbol     name 

      "        quotation                     >        greater than
      #        sharp                         _        underline
      &        ampersand                     |        vertical bar
      '        apostrophe                    !        exclamation mark 
      (        left parenthesis              $        dollar
      )        right parenthesis             %        percent
      *        star, multiply                ?        question mark
      +        plus                          @        commercial at
      ,        comma                         [        left square bracket
      -        hyphen, minus                 \        back-slash
      .        dot, point, period            ]        right square bracket
      /        slash, divide                 ^        circumflex
      :        colon                         `        grave accent
      ;        semicolon                     {        left brace
      <        less than                     }        right brace
      =        equal                         ~        tilde    


[INDEX][CONTENTS]