Echo message works without the space?

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Code:
TCC  22.00.29 x64   Windows 7 [Version 6.1.7601]
This is not a bug, but I discovered something that is new to me, that is, certain characters can separate;
Code:
Echo message
If the environment variable %abc does not exist;
Code:
@setlocal
@echo off
echo %abc
echo.%abc
echo/%abc
echo:%abc
echo;%abc
echo"%abc
endlocal
With the exception of echo %abc all echo a blank line, instead of ECHO is OFF;
Code:
c:\users\jlc\utils>test
ECHO is OFF






c:\users\jlc\utils>
If %abc is set to a value;
Code:
@setlocal
@echo off
set abc=123
echo %abc
echo.%abc
echo/%abc
echo:%abc
echo;%abc
echo"%abc
endlocal
...the results are;
Code:
c:\users\jlc\utils>test[code]
123
123
123
123
123
123
This works all the way back to 4DOS 8.00

Joe