Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Epsilon Extension Language
      . . .
      Order of Evaluation
      Expressions
         Constants and Identifiers
         Unary Operators
         Simple Binary Operators
         . . .
      Constant Expressions
      . . .

Previous   Up    Next
Order of Evaluation  Epsilon Extension Language   Unary Operators


Epsilon User's Manual and Reference > Epsilon Extension Language > Expressions >

Constants and Identifiers

expression:
        numeric-constant
        string-constant
        identifier
        color_class identifier

The most basic kinds of expressions are numeric and string constants. Numeric constants are of type "int", and string constants are of type "array of character". However, EEL changes any expression of type "array of ..." into a pointer to the beginning of the array (of type "pointer to ..."). Thus a string constant results in a pointer to its first character.

An identifier is a valid expression only if it has been previously declared as a variable or function. A variable of type "array of ..." is changed to a pointer to the beginning of the array, as described above.

Some expressions are called lvalue expressions. Roughly, lvalue expressions are expressions that refer to a changeable location in memory. For example, if foo is an integer variable and func() is a function returning an integer, then foo is an lvalue, but func() is not. The & and . operators, the ++ and -- operators, and all assignment operators require their operands to be lvalues. Only the *, [ ], ->, and . operands return lvalues.

An identifier which refers to a variable is an lvalue if its type is an integer, a spot, a pointer, a structure, or a union, but not if its type is an array or function.

If an identifier has not been previously declared, and appears in a function call as the name of the function, it is implicitly declared to be a function returning an int.

If the name of a previously declared function appears in an expression in any context other than as the function of a function call, its value is a function pointer to the named function. Function pointers may not point to primitive functions.

For example, if foo is previously undeclared, the statement foo(1, 2); declares it as a function returning an int. If the next statement is return foo;, a pointer to the function foo() will be returned.

Once a color class newclass has been declared, you can refer to it by using the special syntax color_class newclass. This provides a numeric code that refers to the particular color class. It's used in conjunction with the primitives alter_color( ), add_region( ), set_character_color( ), and others. See Setting Colors for basic information on color classes, and Color Classes for information on declaring color classes in EEL.



Previous   Up    Next
Order of Evaluation  Epsilon Extension Language   Unary Operators


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.