Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Batch Script: Comments

Comments are used to document the source code. Comments make the Program more readable.

Suppose you written thousand lines of program, without proper documentation, after some time, for the owner of the application also, it is very difficult to figure out what was written.

By using comments, you can document your code at the time of writing program. Comments won't affect your program execution. Comments simply document your code.

How to write comments in batch script?
Using Rem Command, you can record the comments in a batch file.

REM [comment]

Any text followed by REM command is treated as command.


REM Starting the program Execution

REM Printing the version of Windows Operating System

REM Displays the disk volume label and Serial Number of C Drive
vol C:


Microsoft Windows [Version 10.0.16299.547]
 Volume in drive C is OSDisk
 Volume Serial Number is 1034-4F6F

This post first appeared on Java Tutorial : Blog To Learn Java Programming, please read the originial post: here

Share the post

Batch Script: Comments


Subscribe to Java Tutorial : Blog To Learn Java Programming

Get updates delivered right to your inbox!

Thank you for your subscription