What I know about cmd:
Arithmetic:
SET /A expression
The /A command switch specifies that the string to the right of the equal sign is a numeric expression to be evaluated. This expression
evaluator is very simple and supports the following operations in descending order of precedence:
() - grouping
* / % - arithmetic operators
+ - - arithmetic operators
<< >> - logical shift
- bitwise "and"
^ - bitwise "xor"
| - bitwise "or"
= *= /= %= += -= - assignment
&= ^= |= <<= >>=
, - expression separator
If you use any logical or remainder operator, you need to put the expression string
in quotes.
What does grouping mean? How is it used?
Also, how do you do rounding? And things like square roots...
Logical operators:
== equal sign
&& and
|| or
??? what about not equal?
set files=test.txt
!files==test.txt del /q test.txt and it still deleted it *_*
Isn't it like other scripts, with != and !== or <>
Do you have to use the English abbreviations of the symbols themselves?
If all this were made into a unified thread, it would be convenient for beginners like us...
thx!
Arithmetic:
SET /A expression
The /A command switch specifies that the string to the right of the equal sign is a numeric expression to be evaluated. This expression
evaluator is very simple and supports the following operations in descending order of precedence:
() - grouping
* / % - arithmetic operators
+ - - arithmetic operators
<< >> - logical shift
- bitwise "and"
^ - bitwise "xor"
| - bitwise "or"
= *= /= %= += -= - assignment
&= ^= |= <<= >>=
, - expression separator
If you use any logical or remainder operator, you need to put the expression string
in quotes.
What does grouping mean? How is it used?
Also, how do you do rounding? And things like square roots...
Logical operators:
== equal sign
&& and
|| or
??? what about not equal?
set files=test.txt
!files==test.txt del /q test.txt and it still deleted it *_*
Isn't it like other scripts, with != and !== or <>
Do you have to use the English abbreviations of the symbols themselves?
If all this were made into a unified thread, it would be convenient for beginners like us...
thx!

