WAD setarray "/f" only works on first one

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
Dec 10, 2014
63
1
#1
The setarray command is specified for multiple arrays [...] in the help file, but the /f param only works on the first one - the result is that the other arrays don't get unset+set. This is annoying since setlocal doesn't work on arrays, so I have to setarray /f everything on a single line to be sure it works.

[C:\]*setarray x[2] y[2] z[2]

[C:\]*setarray x[3] y[3] z[3]
TCC: Array variable is already defined "x"
TCC: Array variable is already defined "y"
TCC: Array variable is already defined "z"

[C:\]*setarray /f x[4] y[4] z[4]
TCC: Array variable is already defined "y"
TCC: Array variable is already defined "z"

[C:\]setarray /f x[5] /f y[5] /f z[5]
TCC: Not an array variable "/f"
TCC: Array variable is already defined "y"
TCC: Not an array variable "/f"
TCC: Array variable is already defined "z"

 

rconn

Administrator
Staff member
May 14, 2008
10,292
90
#2
The setarray command is specified for multiple arrays [...] in the help file, but the /f param only works on the first one - the result is that the other arrays don't get unset+set. This is annoying since setlocal doesn't work on arrays, so I have to setarray /f everything on a single line to be sure it works.
WAD - /Friday only supports a single argument. You can file a suggestion for multiple argument support in the suggestions forum.