Good afternoon. I was doing a simple batch file, in general, a friend of mine needed me to make that riddle of the 3 gallons of batch water. In general, the batch logic is very simple, however it has a problem in the comparison, where there is the line:
set /A VARIAVELVASO3NO1=%CONTEUDOVASO3%-%QUANTIDADELIVREVASO1%+10
if "%VARIAVELVASO3NO1%" GEQ "10" (
set/a CONTEUDOVASO3=%CONTEUDOVASO3%-%QUANTIDADELIVREVASO1%
set/a CONTEUDOVASO1=8
goto JOGOVASOS
) ELSE (
set/a CONTEUDOVASO1=%CONTEUDOVASO3%+%CONTEUDOVASO1%
set/a CONTEUDOVASO3=0
goto JOGOVASOS
)
The value that% VARIAVELVASO3NO1% stays is 8, since% CONTEUDOVASO3% is equal to 3; and% QUANTITYELIVREVASO1% is equal to 5 (3-5 + 10 = 8). However, instead of entering the FALSE state (which would be ELSE) it enters the first, which is the TRUE state, I first thought it was a problem with negative numbers, so I put everything above 10 (so the +10 in formula) but still the problem persists, any idea what it might be?