Previous Table of Contents Next


3.2.4 Keywords


    The identifiers listed in Table 3-6 are reserved for use as keywords and may not be used otherwise, unless escaped with a leading underscore.

   Table 3-6 Keywords

abstract exception inout provides truncatable
any emits interface public typedef
attribute enum local publishes typeid
boolean eventtype long raises typeprefix
case factory module readonly unsigned
char FALSE multiple setraises union
component finder native sequence uses
const fixed Object short ValueBase
consumes float octet string valuetype
context getraises oneway struct void
custom home out supports wchar
default import primarykey switch wstring
double in private TRUE

   Keywords must be written exactly as shown in the above list. Identifiers that collide with keywords (see Section 3.2.3, “Identifiers,? on page 3-6) are illegal. For example, “boolean? is a valid keyword; “Boolean? and “BOOLEAN? are illegal identifiers.

   For example:

   module M {

   typedef Long Foo; // Error: keyword is long not Long

   typedef boolean BOOLEAN; // Error: BOOLEAN collides with

   // the keyword boolean; };

    OMG IDL specifications use the characters shown in Table 3-7 as punctuation.

   Table 3-7 Punctuation Characters

   ; { } : , =+-( ) <>[ ] ' "\ | ^&*/ %~

    In addition, the tokens listed in Table 3-8 are used by the preprocessor. Table 3-8 Preprocessor Tokens

   # ## ! || &&