[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
特性如此~
  1. If you use any of the logical or modulus operators, you will need to
  2. enclose the expression string in quotes.  Any non-numeric strings in the
  3. expression are treated as environment variable names whose values are
  4. converted to numbers before using them.  If an environment variable name
  5. is specified but is not defined in the current environment, then a value
  6. of zero is used.  This allows you to do arithmetic with environment
  7. variable values without having to type all those % signs to get their
  8. values.
复制代码
This allows you to do arithmetic with environment
variable values without having to type all those % signs to get their
values.
set /a a=%a%+1实际执行的是set /a a=+1而不是set /a a=0+1
set /a a=a+1 才是set /a a=0+1,但在for中它是会实时改变的。
心绪平和,眼藏静谧。

TOP

返回列表