Batch file 如何检查%Points%<;%PCP1%批量生产?
我有两个数值,Batch file 如何检查%Points%<;%PCP1%批量生产?,batch-file,Batch File,我有两个数值,%Points%和%PCP1%。 我希望有这样的东西: IF (%Points% < %PCP1%) ( cls echo Not enough money! echo Hit enter to return home pause goto 2 ) ELSE ( echo Confirm Purchase? Your Points after this purchase will be (%Points% - %PCP1%) pau
%Points%
和%PCP1%
。
我希望有这样的东西:
IF (%Points% < %PCP1%) (
cls
echo Not enough money!
echo Hit enter to return home
pause
goto 2
)
ELSE (
echo Confirm Purchase? Your Points after this purchase will be (%Points% - %PCP1%)
pause
)
IF(%Points%<%PCP1%)(
cls
我没有足够的钱!
echo按回车键回家
暂停
转到2
)
否则(
回音确认购买?此购买后您的积分将为(%Points%-%PCP1%)
暂停
)
它不起作用。请帮忙。谢谢 小于运算符是
LSS
,即:
IF (%Points% LSS %PCP1%) (
其他营办商包括:
- 相等于
- NEQ:不等于
- LSS:少于
- LEQ:小于或等于
- 全球技术法规:大于
- GEQ:大于或等于
IF(2 LSS 1)(ECHO OK)
和IF 2 LSS 1(ECHO OK)
“它不工作”不是对实际问题的描述。