Declaring variables and constants in EGL

You can declare a variable in these ways:
You declare a constant by specifying the symbol CONST followed by the constant name, type, equal sign, and value; and the specified value cannot be changed at run time. Examples are as follows:
  const myString String = "Great software!";
  const myArray  BIN[] = [36, 49, 64];
  const myArray02 BIN[][] = [[1,2,3],[5,6,7]];

A constant cannot be in a record or other complex structure.

Finally, to declare multiple variables or constants in a single statement, separate one identifier from the next by a comma, as in these examples:
  const myString01, myString02 STRING = "INITIAL";
  myItem01, myItem02, myItem03 CHAR(5);
  myRecord01, myRecord02 myRecordPart;

Related concepts
References to parts
Parts
Typedef

Related tasks
Declaring a record that redefines another

Related reference
Primitive types
Use declaration

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.