I don't use the :: as comments, but I've seen them used before.
As for how the command interpreter processes batch files internally, I won't make any guesses. It does however have a problem with :: in if statements.
I ran a test on both NT2000 and XP Profession and REM worked just fine in any combination from within the if statement.
I did run into problems when I did the following:
if 1==1 (
::Test1
::Test2
echo Test
)
This results in "The system cannot find the drive specified." on both XPPro and NT2000.
if 1==1 (
::Test1
echo Test
::Test2
)
This results in ") was unexpected at this time." on both OS's.
The following work just fine:
if 1==1 (
REM Test1
REM Test2
echo Test
)
if 1==1 (
REM Test1
echo Test
REM Test2
)
Good Luck,
Steve
Main Topics
Browse All Topics





by: sirbountyPosted on 2004-07-01 at 21:59:28ID: 11454081
Interesting info - thanx for sharing...I believe we have a couple of die-hard DOS gurus here that might be able to shed some light on this...if you don't mind, I'll sit back and watch. :D