So been there, done that, time to move on from batch.
But before that, a quick list of all the batch programming scripts already available here:
Variables and spaces
Using CD /D
The Boring Black Hole
Working with arguments, part 1
Working with arguments, part 2
Working with arguments, part 3
Using CON... or not
How to clear the log file
Getting the batch file path
Retrieving argument file size
Comparing files by size
Reading from a file: part 1
Reading from a file, part 2: looping
Reading from a file, part 3: looping, part 2
Using FOR /D
Making and calling a subroutine, part 1
Making and calling a subroutine, part 2
Using The Substring Equivalent
Creating a timestamp
Using setlocal enabledelayedexpansion
The difference between :: and REM
Getting file information
Using help to help yourself (part 1)
Using help to help yourself (part 2): publishing batch help information in HTML format
Showing posts with label REM. Show all posts
Showing posts with label REM. Show all posts
Friday, 1 August 2008
Sunday, 27 July 2008
Batch programming tip#14: The difference between :: and REM
Both REM and :: are commonly used to "comment out" a line in batch files, so what's the difference between them?
REM is the true "Remark" command. In other words it is treated as such and interpreted.
::, on the other hand, is an invalid label (a label starts with a colon) and is therefore simply skipped.
What this means is using REM is slower than using :: because :: means the line is skipped and the next is interpreted whereas with REM the line isn't skipped in the first place.
Thoughts?
REM is the true "Remark" command. In other words it is treated as such and interpreted.
::, on the other hand, is an invalid label (a label starts with a colon) and is therefore simply skipped.
What this means is using REM is slower than using :: because :: means the line is skipped and the next is interpreted whereas with REM the line isn't skipped in the first place.
Thoughts?
Subscribe to:
Posts (Atom)