Special characters

You can use non-alphanumeric characters in EGL in any of the following roles:

Delimiters

Delimiters mark the beginning and end of an entity. EGL uses the following delimiters:
quotation marks " "
Quotation marks in EGL always enclose a STRING literal.
braces { }
Braces can enclose any of the following things:
  • Property value assignments, as in the following example:
    username STRING {inputRequired = YES, upperCase = YES};
  • Initial value assignments for record fields, as in the following example:
    record CustomerRecord type BasicRecord {
          customerNumber=0, 
          customerBalance=0}
       customerNumber INT;
       customerBalance MONEY;
    end
  • Initialization for variables (usually with arrays), as in the following example:
    myStringsInit string[2] {"Hello", "Goodbye"};
  • Any combination of the above. Set variables or fields first, then properties:
    myDecimals decimal(10,2)[3] {55.43, 22.12, 4.34, CurrencySymbol = "$"};
brackets [ ]
Brackets can enclose any of the following things:
  • The number of elements in an array, as in the following example:
    myBigInts bigint[2];
  • An array literal, as in the following example:
    myBigInts = [10, 40];
  • The index of an array, as in the following example:
    myBigInts[2] = 5;
  • A range of values in a regular expression, as in the following example (see matches operator):
    if (myVar01 matches "[a-c]*")
parentheses ( )
Parentheses can enclose any of the following things:
  • The parameters, arguments, or return values of a function, as in the following example:
    function testFunction1(myInt INT in) returns(INT)
       return(5);
    end
    
    function testFunction2()
       testFunction1(12);
    end
  • Parts of an expression to be evaluated first, as in the following example:
    newVar INT = (5-2)*4;
  • The range of a variable (required for certain types), as in the following example:
    newDecimal DECIMAL(10,2);
  • Negative numbers in a mask, as in the following example:
    result = strLib.formatNumber(myNum,"(*,***,###.##)");

Feedback