REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


Using a compound variable as tail of another compound variable





 
/* code sequence showing the use of a compound variable as tail       */
/* of another compound variable                                       */

  index.0=4
  index.1=1
  index.2=2
  index.3=3
  index.4=4
  index.5=5

                        /* get the value                              */
  say value( "index." || value( index.0 ) )

                        /* set a new value                      v1.70 */
  newValue = 6                                               /* v1.70 */
  call value "index." || value( index.0 ), newValue          /* v1.70 */

                        /* get the old value and set a new      v1.70 */
                        /* value                                      */
  newValue = 7                                               /* v1.70 */
  oldValue = value( "index." || value( index.0 ), newValue ) /* v1.70 */


  

Inf-HTML End Run - Successful