the following should print false and then true but instead it prints false and false I debugged it a bit, and it seems like when the batch is in the if, the call woeks, but does not set res
why is that?
@echo off
set res=true
Call :IsSame None None1
if false==false (
echo %res%
Call :IsSame None2 None2
echo %res%
)
GOTO :EOF
:IsSame
echo isSame
set res=false
if %~2==All (
set res=true
goto :EOF
)
if %~2==%~1 (
set res=true
goto :EOF
)
goto :EOF