Hello welcome again,
Hope you are doing well ,if so lets continue. Today we are going to learn something more interesting about variable.
"What is variable" ??
"variables are containers that holds values that could be nos,strings,symbols etc..."
Syntax:
Set variable-name=values
So , the set command sets the values to the variable in variable container called to be the variable name.
Eg:
@echo off
Set name=ashlin gabriel
Set age=21
well here how do we display the variable.........????
we have to enclose the variablename with %% i.e %variable-name% .
Eg:
@echo off
echo %name%
echo %age%
save the file as .bat
No comments:
Post a Comment