Please enable JavaScript to view this site.

A-Shell Reference

Navigation: Development Topics > Dynamic Structures > Dynstruct Limitations

Indirect Deferred Syntax Limitations

Scroll Prev Top Next More

As noted above, in the indirect deferred method, dynstruct members are referenced by the combination of the dynstruct variable, .@, and then a string variable containing the actual name of the dynamic member. If that member is an array, the name should have a "(" appended to it.

The variable containing the member name can only be a standard scalar or array string variable, e.g.

ds.@fname$               ! scalar variable referencing scalar member

ds.@fname$(x)            ! array variable referencing scalar member

ds.@fname$(x+y)(a*b)     ! array variable referencing array member

 

What you can NOT do is use other kinds of string variables or expressions, such as literal strings, ordmaps, structure members, dot variables, etc. None of the following are legal:

ds.@"price"              ! illegal syntax

ds.@a(b).c               ! illegal syntax

ds.@$map(a$)             ! illegal syntax

 

Note that in order to use indirect deferred syntax to reference an array element within the dynstruct, you must also use an array to reference to the field name, as in the "array variable referencing array member" example above. Refer back to the section on Array Dynstruct Members in the Reference / Usage Dynamic topic for further explanation.