In order to save values it is possible to use variables in the batch language. A variable is introduced to the interpreter automatically once it is used for the first time. No previous declaration is required. Names of variables must start with a letter or an underscore. Digits, letters or more underscores could follow. Names could be:
a, num1, _test, first_net, k17_u, Test_buffer_1
The interpreter distinguishes between lower and upper case letters. The type of a variable is not known until a value is assigned to it. The variable has the same type as the assigned value:
a = 5
filename := "first.net"
init_flag := TRUE
NET_ERR = 4.7e+11
a := init_flag
The assignment of variables is done by using `=' or `:='. The comparison operator is `=='. The variable `a' belongs to the type integer and changes its type in line 5 to boolean. Filename belongs to the type string and NET_ERR to the type float.