1.

Solve : Is "set chat=

Answer»

echo off
setlocal enabledelayedexpansion
set CHAT=echo chat=%chat%
:loop
echo enter greeting?
set /p chat=
echo chat=%chat%
IF "%chat%"=="" (
echo Nothing is entered
goto :loop
)
if  "%chat%"=="HI" (
echo Hello
set chat=goto :loop
)
echo Hasta La Vista
echo Do you want to STOP(Y/N)
echo Use upper case Y
set /p ans=
if %ans%==Y goto :end
set chat=goto :loop
:end
echo Byeset chat=Does not GIVE an error.
But this:
set chat=
seems to do the same THING.



Discussion

No Comment Found