Using a compound variable as tail of another compound variable

[Autolink] Menu

 
/* 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 */


[Back: Check if a compound variable is defined]
[Next: Simple debug routine]