只要明白set /a的特性就能简洁明了的解答此题了。
- If you use any of the logical or modulus operators, you will need to
- enclose the expression string in quotes. Any non-numeric strings in the
- expression are treated as environment variable names whose values are
- converted to numbers before using them. If an environment variable name
- is specified but is not defined in the current environment, then a value
- of zero is used. This allows you to do arithmetic with environment
- variable values without having to type all those % signs to get their
- values.
复制代码
|