Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

WAD ECHO ON Does Not Work in TCC-RT

Jun
1,092
48
This is probably intentional, but command lines are not echoed in batch scripts even after an ECHO ON command is issued. The variable %_ECHO does reflect the echoing state, but it has no effect.

Assuming that this is intentional, I would suggest including this information in the README.TXT file that comes with TCC-RT.
 
Works for me.

Code:
v:\> type eval50.btm
echo on
option //EvalMax=50

v:\> d:\tcc-rt\tcc.exe eval50.btm

option //EvalMax=50


v:\>
 
Yep, it works when running TCC-RT from TCC,
which is what @vefatica is doing.

Another reason NOT to test TCC-RT .btms from TCC.

Joe
 
Interesting. Is Rex turning off the processing of the ECHO state unless one is running TCC-RT under TCC, showing that the full product has been purchased.

Like Joe, I am making sure to run TCC-RT in an environment available to someone who does not own the TCC product. I want to be sure that my script works without depending on any TCC functionality that is not supported in TCC-RT. (I've tested my web page generation script, and it works, though I'm not quite sure how I would teach my colleague to use it.)

Meanwhile, for my own ease of working, I have a rather full-featured quasi-interactive version of TCC-RT running under CMD. It maintains a command history file and adds "call" prefixes to each command, even in a command line with multiple commands. Perhaps with a lot of work, I could even finesse command history recall using a keystroke. So far, I can display the command history and copy commands via the clipboard.
 
Works from the run dialog (Win+R). Works from PWSH (7.6.3). This is from PWSH.

Code:
V:\> $PSVersionTable.PSVersion

Major  Minor  Patch  PreReleaseLabel BuildLabel
-----  -----  -----  --------------- ----------
7      6      3


V:\> get-content V:\eval50.btm
echo on
option //EvalMax=50
pause

V:\> d:\tcc-rt\tcc.exe v:\eval50.btm

option //EvalMax=50
pause
Press any key when ready...
 
Vince, I think you put your last post into the wrong thread. You sure had me confused for a while as I tried to figure out what that had to do with the ECHO state.
 
Vince, I think you put your last post into the wrong thread. You sure had me confused for a while as I tried to figure out what that had to do with the ECHO state.

Do you mean post #6? Where do you think it belongs? Isn't this thread about batch lines being echoed (or not) after ECHO ON in TCC-RT?
 
Sorry, it looked as though it was about the option settings.

So what do you think is controlling whether TCC-RT respects ECHO ON and ECHO OFF? Did you try it under CMD?
 
Sorry, it looked as though it was about the option settings.

So what do you think is controlling whether TCC-RT respects ECHO ON and ECHO OFF? Did you try it under CMD?
I have no clue. It works everywhere I've tried it. The classic question: Do you have an alias for ECHO? Here's CMD.

Code:
v:\> type v:\eval50.btm
echo on
echo BatchEcho is %@option[BatchEcho]
echo _ECHO = %_echo
option //EvalMax=50
pause

v:\> d:\tcc-rt\tcc.exe v:\eval50.btm

echo BatchEcho is No
BatchEcho is No
echo _ECHO = 1
_ECHO = 1
option //EvalMax=50
pause
Press any key when ready...
 
Do you have an alias for ECHO? Here's CMD.

No. I have ensured that there are no aliases, no functions, no INI file, no TCSTART or TCEXIT.

I just played around some more and discovered something significant. When I invoke TCC-RT without options, echoing works as expected. However, when I launch it with the options "/I /L /Q", echoing does not happen no matter what the setting is.

After a little more testing: it is the /Q option! Apparently is does more than turn off the copyright. It puts TCC-RT in a quiet mode where it does not echo commands.

Uggh.
 
After a little more testing: it is the /Q option! Apparently is does more than turn off the copyright. It puts TCC-RT in a quiet mode where it does not echo commands.

Nice find! It's true of TCC also. That seems like a bug to me. Here's TCC.

Code:
v:\> *ver

TCC  36.51.77 x64   Windows 11 [Version 10.0.26200.8875]

v:\> type eval50.btm
echo on
echo BatchEcho is %@option[BatchEcho]
echo _ECHO = %_echo
option //EvalMax=50
pause

v:\> %comspec /c /q v:\eval50.btm
BatchEcho is No
_ECHO = 1
Press any key when ready...
 
The help for the /Q option of TCC says:

Don't display version / copyright message (registered copies only).​

It doesn't say anything about turning of batch echoing. I just tried launching the full TCC with the /Q option, and it does turn off batch echoing.
 
I see that we were doing the same next step at the same time.

I agree: it is a bug in either the code or the documentation.
 
Not only that but it's permanent. If, in TCMD, I do Tabs\Run ... d:\tc36\tcc.exe /q, I get a new tab. In the new TCC, ECHO ON is not honored in BTMs. That deserves a new (bug) thread; this thread is a tad long.
 
WAD - CMD.EXE compatibility.

That's OK, but the fact that the documentation is erroneous is not. The help says only that it turns off the copyright notice on startup.

I was working on a script that sends its output to standard-out for redirection, so I had to suppress the copyright notice. The Q option looked like just what was needed. Then I spent a lot of time trying to figure out why echo on was not working. Had the help been accurate, I could have spent that time trying to find another solution.
 
Back
Top