next up previous 229
Next: Recursive substitution.
Up: Formatting Transformation Functions
Previous: Token delimiters.

Example 9. Substituting values into variable names.

This simple example formulates a set of transformation functions to multiply each ordinate of a 3-dimensional coordinate system $(X_1,X_2,X_3)$ by 2.0 to yield the coordinates $(Y_1,Y_2,Y_3)$:

       INTEGER I, NSUBS, STATUS
       CHARACTER FOR( 3 ) * 30

       DO 1 I = 1, 3
          FOR( I ) = 'Y<I> = X<I> * 2.0'
          CALL TRN_STOKI( 'I', I, FOR( I ), NSUBS, STATUS )
     1 CONTINUE



next up previous 229
Next: Recursive substitution.
Up: Formatting Transformation Functions
Previous: Token delimiters.

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