- Jul
- 20
- 0
Now that I have reported the "Strange Unexpected Features I found in my 1st hour of testing the demo, I have been looking at the documented features and general operation.
What I find a difficulty with, is that when the TCC screen shows the batch line to be executed, sometimes the batch variables are shown as un-expanded (e.g. if "%md5%"=="")
and sometimes as expanded (e.g. find ",""e967594941e290ac557d4f77a1b02025""," "All_TRS80.lst" for the line "find %md5%"," "All_TRS80.lst"
This makes debugging a repeating sequence much harder because you can't scroll back through the screen and see the values used at each iteration.
Have look at the screen dump below and try to figure out what the value of %dups% is at each instance of :-
if %dups% LSS 2
In an normal CMD environment, the variables are always replaced by their value before the line is echoed to the screen (unless inhibited by delayed expansion)
So, my question is :-
Is there some method to make the TCC screen show the variable's value, instead of it's name, or do I have to add extra code like :-
set val=%dups% & if %dups% LSS 2
just to show the variable's value at the time of the iteration ??
I have searched the Help and on-line documentation, but can't find any mention of parameters or facilities for the Debugger screen.
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""e967594941e290ac557d4f77a1b02025""," "All_TRS80.lst" > dups.chk
find /c ",""e967594941e290ac557d4f77a1b02025""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set file="diskdisk.txt"
set md5=a3713913a2d1937f92271cf3af1d659b
if "%md5%"=="" goto :eof
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""a3713913a2d1937f92271cf3af1d659b""," "All_TRS80.lst" > dups.chk
find /c ",""a3713913a2d1937f92271cf3af1d659b""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set file="diskio.bas"
set md5=9b84cbfb12e1ec8d5782e0e6cd43750e
if "%md5%"=="" goto :eof
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," "All_TRS80.lst" > dups.chk
find /c ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set /a dups=0
find /c ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," dups_list.csv > dup_done.chk
for /f "tokens=2 delims=:" %%d in ('type dup_done.chk') do set /a dups=%%d
if %dups% NEQ 0 goto :eof
for /f "tokens=* delims=? skip=2 " %%f in ('type dups.chk') do call :count_dups %%f
set file=diskio.bas
if not "%file:~0,3%"=="(d)" ( if not "%file:~0,3%"=="(x)" ( if not "%file:~0,3%"=="(j)" ( if not "%file:~0,3%"=="(u)" ( if not "%file:~0,3%"=="(b)" set /a dups+=1 ) ) ) )
goto :eof
What I find a difficulty with, is that when the TCC screen shows the batch line to be executed, sometimes the batch variables are shown as un-expanded (e.g. if "%md5%"=="")
and sometimes as expanded (e.g. find ",""e967594941e290ac557d4f77a1b02025""," "All_TRS80.lst" for the line "find %md5%"," "All_TRS80.lst"
This makes debugging a repeating sequence much harder because you can't scroll back through the screen and see the values used at each iteration.
Have look at the screen dump below and try to figure out what the value of %dups% is at each instance of :-
if %dups% LSS 2
In an normal CMD environment, the variables are always replaced by their value before the line is echoed to the screen (unless inhibited by delayed expansion)
So, my question is :-
Is there some method to make the TCC screen show the variable's value, instead of it's name, or do I have to add extra code like :-
set val=%dups% & if %dups% LSS 2
just to show the variable's value at the time of the iteration ??
I have searched the Help and on-line documentation, but can't find any mention of parameters or facilities for the Debugger screen.
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""e967594941e290ac557d4f77a1b02025""," "All_TRS80.lst" > dups.chk
find /c ",""e967594941e290ac557d4f77a1b02025""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set file="diskdisk.txt"
set md5=a3713913a2d1937f92271cf3af1d659b
if "%md5%"=="" goto :eof
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""a3713913a2d1937f92271cf3af1d659b""," "All_TRS80.lst" > dups.chk
find /c ",""a3713913a2d1937f92271cf3af1d659b""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set file="diskio.bas"
set md5=9b84cbfb12e1ec8d5782e0e6cd43750e
if "%md5%"=="" goto :eof
set /A dups=0
if %2=="casrdr80.bas" pause
find ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," "All_TRS80.lst" > dups.chk
find /c ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," dups.chk > dups.cnt
for /f "tokens=2 delims=:" %%m in ('type dups.cnt') do set /A dups=%%m
if %dups% LSS 2 goto :eof
set /a dups=0
find /c ",""9b84cbfb12e1ec8d5782e0e6cd43750e""," dups_list.csv > dup_done.chk
for /f "tokens=2 delims=:" %%d in ('type dup_done.chk') do set /a dups=%%d
if %dups% NEQ 0 goto :eof
for /f "tokens=* delims=? skip=2 " %%f in ('type dups.chk') do call :count_dups %%f
set file=diskio.bas
if not "%file:~0,3%"=="(d)" ( if not "%file:~0,3%"=="(x)" ( if not "%file:~0,3%"=="(j)" ( if not "%file:~0,3%"=="(u)" ( if not "%file:~0,3%"=="(b)" set /a dups+=1 ) ) ) )
goto :eof