Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
Add comments and multiline comments in MS DOS
19374 Views
REM command is used to add commands in MS DOS batach files. REM means REMARK. REM command is especially designed to give remarks or comments on the batch file or configuration files.

Syntax
REM <your remarks or comments here>
Example batch file for Single line comments
@ECHO off
REM Example program to add two numbers using a and b params

SET /p aval=Enter the a value:
SET /p bval=Enter the b value:

SET /a cval= %aval% + %bval%
ECHO. "A+B=%cval%"

SET /p exit=Press any key to exit
Output 
Multiline comments in MS DOS batch 
Escape statements using goto like below statements.

goto :my_program_comments
         Example no: 10001
         Defi: Example to add numbers in batch file
         Author: Parthasarathy B
:my_program_comments
Next Topics
Next lessons of current book.
Things to Know of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Previous Topics
Previous lessons of current book.
Things to Know of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details