- Aug
- 2,016
- 81
Hi,
This batch file;
works, without displaying an error. I had converted a switch/endswitch group to an iff/endiff group in another .btm, and had forgotten to replace the endswitch with an endiff.
So, I made up this test batch file to see if it was true, that I could use iff and endswitch together. It appears that I can, with no error being generated.
However, regardless of the results of the iff condition, the final message;
should be executed. If there is not 3 command line arguments, the final message
is not executed.
I could not figure out why my other .btm code was not working. Finally, I used bdebugger to step through the code. When I reached the
bdebugger would not allow me to continue stepping through the program, and ended execution of the .btm
It was at this point that I noticed my coding error. Of course, an iff/endswitch should not work.
This is my fault, for not having a matching iff/endiff, but I thought that some kind of error message would have been displayed because of my use of iff/endswitch.
I am using;
Joe
This batch file;
Code:
@setlocal
@echo off
iff %# ne 3 then
echo You need 3 command line arguments
else
echo Okay
endswitch
echo At the end of the program
endlocal
works, without displaying an error. I had converted a switch/endswitch group to an iff/endiff group in another .btm, and had forgotten to replace the endswitch with an endiff.
So, I made up this test batch file to see if it was true, that I could use iff and endswitch together. It appears that I can, with no error being generated.
However, regardless of the results of the iff condition, the final message;
Code:
echo At the end of the program
should be executed. If there is not 3 command line arguments, the final message
Code:
echo At the end of the program
is not executed.
I could not figure out why my other .btm code was not working. Finally, I used bdebugger to step through the code. When I reached the
Code:
iff %# ne 3 then
bdebugger would not allow me to continue stepping through the program, and ended execution of the .btm
It was at this point that I noticed my coding error. Of course, an iff/endswitch should not work.
This is my fault, for not having a matching iff/endiff, but I thought that some kind of error message would have been displayed because of my use of iff/endswitch.
I am using;
Code:
TCC 15.01.52 Windows Vista [Version 6.0.6002]
TCC Build 52 Windows Vista Build 6002 Service Pack 2
Registered to Joe Caverly - 1 System License
Joe