BARfly Help - BAR Implementation File Reference - Expressions

  Identifier Interpretations

In an expression, an “IdentifierName” term can be interpreted in many different ways if no operator provides additional context.  The compiler must check the identifier against the following terms, in the order they appear in the list:

  1. Built-in function
  2. Local variable (function scope)
  3. Parameter variable (function scope)
  4. Member variable (member function scope; only applies to member functions)
  5. Member function (member function scope; only applies to member functions)
  6. Global variable (global scope)
  7. Global function (global scope)
  8. Invalid identifier

Invalid identifiers cause errors.

There are also conditional identifier interpretations, including the structure member dereference operator ('.') and the pointer-to-structure member dereference operator ('->').  These operators expect the right-side expression to be a member identifier.  However, due to the possibility of prohibitive complexity of the left-side expression, it is not always apparent what structure type is used as a basis for the member dereference.

What this means is that the left-side expression must be completely evaluated before the dereference is allowed to occur.  Only then does the resulting expression assume proper L-value, integer/floating point, and scalar/structure/pointer status.


  See also:  [Expression characteristics] [Identifier interpretations] [Built-in functions] [Special load considerations]
[Additional rules for expressions] [Final expression type result] [L-value status gain and loss]
[Overly complex expressions] [Limitations on pointer usage] [Structure member dereference:  bit scan blocks]


BARfly Help Copyright © 2009 Christopher Allen