1
我看了很多,找不到为什么会发生这种情况。这很简单,但不起作用。批量设置/一个不工作
:numbers
cls
set /p first=First:
set /p second=Second:
set /p third=Third:
set /p fourth=Fourth:
set /p fifth=Fifth:
goto solve
:solve
cls
set /a s-f= %second% - %first%
set /a t-s= %third% - %second%
但最后两行不工作,我知道这是因为这些我都试过回声%VARIABLE_NAME%,并将其显示为我想要什么,但对/一个没有。
那么,它是一个普通意义上的有效环境变量名称,但该名称不能在SET/A语句中使用。 SET/A要求名称不包含数学运算符或分隔符。 – dbenham
谢谢,我不知道,并会记住这一点 – Joseph