Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Documentation When the array name is in a variable ...

May
13,823
211
When the name of an array is in a variable, manipulating the array is a little tricky. The help might benefit from an example. Here's a fairly simple one.

Code:
    :: swap ith and jth entries of the array
    :: whose name is in the variable aname
    set tmp=%[aname[%i]]
    set %aname[%i]=%[aname[%j]]
    set %aname[%j]=%tmp
 
Back
Top