1.3 Symbolic Names

Simple Name

Procedures, parameters, variables, micros, macros, and structures are declared using simple names. The first character is a letter that may be followed by alphanumeric characters or '.', '_', or '#'. A trailing underscore is not allowed.


Structure Field

Structure fields are referenced using a tick ('`') character between the variable and one or more fields.


Subject Parameter

The first parameter in a procedure is called the Subject of the procedure. It can be referenced by it's name or by using a dollar sign for short.


Shadow Variable

Shadow variables are implicitly declared Locals that are initialized upon entry into a Method or Function. They are set to the value of an Entry or Change parameter. You can reference them as the name of the parameter followed by a dollar sign. When you use a shadow variable a Local variable is automatically declared and initialized to the corresponding input value.


Shadow variables are initialized after any preconditions. Consequently you cannot use Shadows in Preconditions or in Trace commands at the beginning of a method body. Also, array parameters cannot have Shadows.

You can abbreviate the Shadow of the procedure subject as: $$
Fields of Shadows are referenced as: Variable$Field
Additional fields use the tick notation: Variable$Field`Subfield

When using a Shadow of a field in a structure the entire structure is declared; not just a shadow of the field. So for the reference "$$Field" a Shadow variable for the subject is declared and initialized to the subject.


Command Keyword

Variable, Class, and Method names generally should not be one of the intrinsic Gilda command names. However as long as there is no ambiguity you can use the same name as a keyword. Command keywords in Gilda are:


Note that the Open, Close, Clean and Drain commands are designed so they can be overloaded. Users can write generic methods whose names match the keywords. Clean and Drain methods are automatically invoked when initializing and freeing resources and dynamic types.

Commenting Code

Primitive Type