LEAVE inside an argument-acquisition loop seems to make a subsequent test for empty argument fail, as well as cause a spurious error message:
Read more
Code:
[C:\batch]type foo.btm
@ echo off
do until (%1) == ()
iff (%1) == (trap) then
shift
leave
endiff
shift
enddo
:PASTEND
iff (%1) ne () then
echo (%1): too many parms!
endiff
[C:\batch]foo a b c trap x
(x): too many parms!
[C:\batch]foo a b c trap
(): too many parms!
TCC: C:\batch\foo.btm [13] Unknown command...
Read more