next up previous 229
Next: Example 10. Constructing a polynomial expression.
Up: Formatting Transformation Functions
Previous: Example 9. Substituting values into variable names.

Recursive substitution.

The routine TRN_STOK, which allows text to be substituted in place of a token, admits some more sophisticated possibilities, including the insertion of text which itself contains tokens (perhaps including further instances of the original token). Although the substitution performed by a single call to TRN_STOK will not be affected by the presence of tokens within the substituted text (i.e. the substitution is not recursive), the routine may nevertheless be invoked repeatedly to perform recursive substitution if required. This capability can be used to construct more complex expressions which have a suitable recursively defined form.



next up previous 229
Next: Example 10. Constructing a polynomial expression.
Up: Formatting Transformation Functions
Previous: Example 9. Substituting values into variable names.

TRANSFORM Coordinate Transformation Facility
Starlink User Note 61
R.F. Warren-Smith
12th January 2006
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils