How can the execution of an AML directive or function in an &DATA block be delayed until the contents of the &DATA block are executed?
AML functions and directives are executed prior to non-AML directives or functions in an &DATA block. When the AML interpreter gets to a &DATA line, it reads all the lines that follow until it finds an &END. It does not yet execute the commands, but reads them into temporary memory. Any AML functions or directives found along the way are executed at this stage. Once the
interpreter has read the entire &DATA block, the &DATA block is executed. At
this point, only the results of the AML functions and directives are present in
the &DATA block.
A tilde (~) can be placed in front of a function or directive to delay its execution until the block is actually submitted to the program. This keeps the AML interpreter from evaluating the contents of that line and passes it along with the rest of the commands in the &DATA block. The function or directive is then executed along with the other commands in the &DATA block.
This example uses ~ to supress execution of an AML directive.
&data arc arcedit
- Legacy Products
- ArcMap 8 x