Please enable JavaScript to view this site.

ESL Documentation

The basic syntax for referencing a field in a structure variable is STRUCTURE_NAME.FIELD_NAME. If a field is itself a structure, you add more ".FIELD_NAME" qualifiers until you reach the field you want to reference. You can pass a structure field that is within another structure to a function. In all other cases, a field reference must specify a bottom-level field, whose type is integer, float, or string; for example:

 

copy "Mary"                                to Friends.FirstName 

copy "Ziegler"                                to Friends.LastName

copy "(617)999-2121"                        to Friends.WorkPhone 

copy "(603)555-3939"                        to Friends.HomePhone 

copy "1 Tower Place, Suite 6"        to Friends.WorkAddress.Street

copy "Boston"                                to Friends.WorkAddress.City 

copy "MA"                                to Friends.WorkAddress.State 

copy "02138"                                to Friends.WorkAddress.Zip

...

 

Note that when you reference a structure variable, or a structure field within another structure, you must select a bottom-level field (integer, float, or string) within that structure. There are two exceptions to this rule:

 

You can pass the name of a structure variable to an internal or external subroutine without selecting a field.

You can pass the name of a structure variable or a structure field within a structure variable to an external function.

 

For example, the reference Friends.HomeAddress would be legal in a function argument list, but would be illegal in any other context.