- Mar
- 75
- 1
There is a semi-useful variant of the ECHO command implemented by CMD.exe, and differently by TCC. This is the ECHO. variant, (although the trailing dot can be several different punctuation character.) In CMD.exe and TCC, this has the effect of suppressing the normally unwanted "ECHO is ON" (or OFF) behavior when given an empty command tail. In CMD.exe, it has the extra effect of rendering leaving %EnvVarName% constructs as entered if there is no such named environment variable, while in TCC the expansion results in an empty string. This session screen-scrape/paste demonstrates the difference (with PROMPT set to . to reduce clutter):
While I do not consider the CMD.exe behavior to be a bug, TCC's "Duplicate CMD.EXE bugs" option has no effect on it.
(This is from TCC version 23.00.24.)
Code:
. cmd
Microsoft Windows [Version 10.0.17134.165]
(c) 2018 Microsoft Corporation. All rights reserved.
. echo. furd? %Furd%
furd? %Furd%
. exit
. echo. furd? %Furd%
furd?
.
While I do not consider the CMD.exe behavior to be a bug, TCC's "Duplicate CMD.EXE bugs" option has no effect on it.
(This is from TCC version 23.00.24.)