I've been working with arrays lately to read lists from a file. Now I noticed that once an array has
been filled, it can no longer be deleted or read in again. That means, the commands
UNSETARRAY arFilesList or SETARRAY /F /R filename arFilesList are completely ineffective.
I wrote a little "Test_Array.BTM" to check it out:
If I start the debugger again after the first run, e.g. with another file to read in, the array is still
present and still filled and will not be changed ! When I exit the debugger session, the array is still
present in the TCC session and cannot be used again for SETARRAY /R !
In TCC 18 this still worked ...
And it goes even further : If I open a new shell with F7 (not mentioned in the manual) from the debugger
while the program is running, then all environment variables currently in use with the current states are
present there, but not arrays ! This has probably always been the case from beginnig of using arrays, but
nobody noticed it yet :-)
And - Arrays are not inherited or shared like the Environment, ALiases, Functions to other opened TCC-Sessions.
been filled, it can no longer be deleted or read in again. That means, the commands
UNSETARRAY arFilesList or SETARRAY /F /R filename arFilesList are completely ineffective.
I wrote a little "Test_Array.BTM" to check it out:
Code:
Setlocal
SetArray garJobList[99]
Echo %@EXEC[Set garJobList[0]=Hello everybody, it is %_date at %_time]
Echo ArrayTest 0:[Size:%@ARRAYINFO[garJobList,1]]:"%garJobList[0]"
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Set ListFile=%1
IFF NOT DEFINED ListFile THEN
rem Set ListFile=D:\JPSoft\_SyncListen\NetSyncListe.Txt
rem
Set ListFile=d:\JPSoft\_SyncListen\EvalAttribs_Liste.TXT
rem Set ListFile=d:\JPSoft\_SyncListen\CopyListe.2_Daten
ENDIFF
Echo Listfile=%listfile, with %@INC[%@LINES[%listfile]] lines.
Echo %@LinieMit[*]
:
Pause Show Listfile
Echo.
Do Zeile In @%listfile
Echo `Do`:"%zeile"
EndDo
Echo %@LinieMit[:]
Pause Array actions
Echo Zeile:[%Zeile], z:[%z]
Echo ArrayTest 1:[Size:%@ARRAYINFO[garJobList,1]]:"%garJobList[0]"
rem
If %_bdebugger EQ 1 Echo IDE - Here I am :-)
::
If %@ARRAYINFO[garJobList,0] NE -1 Unset /Q garJobList
:: This means, that the command is completely inoperative !
rem %@If[%_bdebugger EQ 1,Unset /Q garJobList,Echo Nothing ToDo :-)]
SetArray /R %listfile% garJobList
Echo ArrayTest 2:[Size:%@ARRAYINFO[garJobList,1]]:"%garJobList[0]"
::
Do z=0 To %@DEC[%@ARRAYINFO[garJobList,1]]
Set Zeile=%garjoblist[%z]
Echo Array-Z:%z:"%zeile%"
EndDo
Echo.
Echo The Array is not changeable !
Echo ArrayTest 3:[Size:%@ARRAYINFO[garJobList,1]]:"%garJobList[0]"
Echo %@EXEC[Set garJobList[0]="Hello everybody, here is TCC-Batchdebugger"]
Echo ArrayTest 4:[Size:%@ARRAYINFO[garJobList,1]]:"%garJobList[0]"
EndLocal
If I start the debugger again after the first run, e.g. with another file to read in, the array is still
present and still filled and will not be changed ! When I exit the debugger session, the array is still
present in the TCC session and cannot be used again for SETARRAY /R !
In TCC 18 this still worked ...
And it goes even further : If I open a new shell with F7 (not mentioned in the manual) from the debugger
while the program is running, then all environment variables currently in use with the current states are
present there, but not arrays ! This has probably always been the case from beginnig of using arrays, but
nobody noticed it yet :-)
And - Arrays are not inherited or shared like the Environment, ALiases, Functions to other opened TCC-Sessions.