Next Previous Contents

5. Identifiers

The names given to variables, functions, and data types are called identifiers. There are some restrictions upon the actual characters that make up an identifier. An identifier name must start with an alphabetic character ([A-Za-z]), an underscore character, or a dollar sign. The rest of the characters in the name can be any combination of letters, digits, dollar signs, or underscore characters. However, all identifiers whose name begins with two underscore characters are reserved for internal use by the interpreter and declarations of objects with such names should be avoided.

Examples of valid identifiers include:

      mary    _3    _this_is_ok
      a7e1    $44   _44$_Three
However, the following are not legal:
      7abc   2e0    #xx
In fact, 2e0 actually specifies the double precision number 2.0.

There is no limit to the maximum length of an identifier. For practical usage it is wise to limit the length of identifiers to a reasonable value.

The following identifiers are reserved by the language for use as keywords:

   and          andelse      break         case          catch
   continue     define       do            else          ERROR_BLOCK
   exch         EXIT_BLOCK   finally       _for          for
   foreach      forever      !if           if            ifnot
   loop         mod          not           or            orelse
   pop          private      public        return        shl
   shr          static       struct        switch        __tmp
   then         throw        try           typedef       USER_BLOCK0
   USER_BLOCK1  USER_BLOCK2  USER_BLOCK3   USER_BLOCK4   using
   variable     while        xor


Next Previous Contents