Indirect Deferred Syntax Limitations

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.

As of 6.5.1646.5, 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

 

Some of those restrictions might be lifted in the future, but it isn’t clear that the benefits would outweigh the syntactic confusion.