In the following example:
Read more
- The main routine gets the first batch parameter and strips it off. It then calls SUBR, which does the bulk of the work.
- SUBR calls SUBR2, which gets the next batch parameter and strips it off.
- SUBR then processes the rest of the parameters.
Code:
[D:\TMP] type foo.btm
@ echo off
echo Input parm string is %*
echo parm1 starts out %1
shift
echo after shift, parm1 is %1
gosub subr
echo at end, parm1 is %1
quit
:SUBR
gosub SUBR2
echo in...
Read more