Problem

Why can't I use '_' or a number as an identifier in IDL?

Solution

According to IDL specifications (I have used here CORBA V.2.2 specs), an identifier (for example the name of a method or of an attribute) cannot start with a number or underscore or non-alphabetic characters:

Section 3.23 Identifiers

An tidentifier is an arbitrary long sequence of alphabetic,digit, and underscore ("_") characters. The first character must be an alphabetic character.

According to this definition, both _5v and 5v are illegal identifiers.

I have verified that:

  • TAO refuses '5v'
  • JacORB refuses '_5v'

but they are both illegal from the specs' point of view.

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.



Related issues