1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

DO?

Discussion in 'Plugins' started by vefatica, Oct 30, 2009.

  1. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    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.
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    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!
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,794
    Likes Received:
    29
    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.
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,732
    Likes Received:
    81
    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.


    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.
     
  5. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,280
    Likes Received:
    38
    So, you just need to solve the Turing halting problem. We expect it in v12.
     

Share This Page