- 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