Welcome!

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

SignUp Now!

WAD "setarray /f" only overwrites the first array var

Dec
73
1
You can set multiple arrays on one line, but the /f parameter only applies to the first one - the others keep throwing an error:

C:\]setarray x[10] y[10]

C:\]setarray x[10] y[10]
TCC: Array variable is already defined "x"
TCC: Array variable is already defined "y"

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

This is unfortunate since setlocal strangely doesn't apply to arrays unsetarray'ing each and every one before setarray'ing it is a nuisance. The other choice - multiple settarray /f lines - clutters the code.
 
Right, looking again at how the [] are placed in the docs you're probably right - though applying the /f to every array var seems more natural to me as there's no way to place other successive /f for them.
 

Similar threads

Back
Top