DO?

#1
If I execute a batch file containing simply

Code:
DO
TCC uses 25% CPU until it is interrupted (Ctrl-C) or is closed. What's it doing? This seems undesirable.

And what's Do_Cmd(). Can it be used for anything ... what ...how?

Thanks.
 
#3
And if I execute a batfile containing (only) "DO i", I get a syntax message.

If the batfile contains (only) "DO i=", it appears to execute DIR.

It's very strange!
Forget that message. It was a corrupt Unicode file (no BOM). But my earlier observation remains. If the file says merely "DO", TCC gets stuck.
 

rconn

Administrator
Staff member
May 14, 2008
10,324
94
#4
> If I execute a batch file containing simply
>
> Code:
> ---------
> DO
> ---------
> TCC uses 25% CPU until it is interrupted (Ctrl-C) or is closed. What's
> it doing? This seems undesirable.
It's trying to read the next line in the batch file. (12% CPU usage here.)
YOU may know it's not a self-modifying batch file, but only the DWIM parser
can be sure.


> And what's Do_Cmd(). Can it be used for anything ... what ...how?
It's the DO parser, and it cannot be used by a plugin, because it loops back
through the command parser and uses a second function to test for loop
termination.