Welcome!

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

SignUp Now!

The "command" in the @EXECARRAY Function

Jun
1,092
48
From reading the help, I thought that the second parameter in the @EXECARRAY function had to be a TCC command. It turns out to be much broader than that. I was pleasantly surprised to see that it can even be a gosub call in a batch file. So you don't have to struggle to build a complex command line within the function itself.

Code:
setarray /f TestArray[20]

iff %@execarray[testarray,gosub FillArray] EQ 0 then
  echo Function EXECARRY worked
else
  echo Function EXECARRY failed
endiff

echo TestArray[7] = %TestArray[7]

quit

:FillArray
do i = 0 to 19
  echo %@eval[ 2 * %i ]
enddo
return

Here's the output.

Code:
->test.btm
Function EXECARRY worked
TestArray[7] = 14
 
Back
Top