Friends and collegues,
The code below speaks for itself,I think. I would expect both forms to work.
Ideas anyone?
Thanks, DJ.
:: First form - does not work
echos The batchfile was called with ``
if %# eq 0 (
echo no arguments.
) else (
echo %# arguments.
do i = 1 to %#
echo %i: %[%i]
enddo
)
:: Second form - does work
echos The batchfile was called with ``
if %# eq 0 (
echo no arguments.
quit
)
echo %# arguments.
do i = 1 to %#
echo %i: %[%i]
enddo
quit
::EOF
The code below speaks for itself,I think. I would expect both forms to work.
Ideas anyone?
Thanks, DJ.
:: First form - does not work
echos The batchfile was called with ``
if %# eq 0 (
echo no arguments.
) else (
echo %# arguments.
do i = 1 to %#
echo %i: %[%i]
enddo
)
:: Second form - does work
echos The batchfile was called with ``
if %# eq 0 (
echo no arguments.
quit
)
echo %# arguments.
do i = 1 to %#
echo %i: %[%i]
enddo
quit
::EOF