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

Bracket problem

Discussion in 'Support' started by mathewsdw, Oct 31, 2010.

  1. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    I have some text in a file from an external source that I want to process that contains open and close square brackets, which I really don't want to remove from the file contents (one solution to the problem, but a bad :( solution in my opinion). I've been unable so far to find a way to process this text "as is", and Mr. Dye's plugin doesn't handle square brackets, either. Is the there a solution to this problem outside of writing the program in another language?
     
  2. Kachupp

    Joined:
    Aug 9, 2009
    Messages:
    133
    Likes Received:
    0
    setdos /x-7
    do the work
    setdos /x0

    its in the help manual
     
  3. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,300
    Likes Received:
    39
    Should it? It would be trivial to add, if there's a need.
     
  4. mathewsdw

    Joined:
    May 24, 2010
    Messages:
    855
    Likes Received:
    0
    Charles, it might be a good idea to add it if it's trivial, but, again, I no longer have a need for it because I wrote a C++ program to handle the situation, and it's general enough that I could probably use it for similar situations, if any, in the future. But if it's trivial in nature and you want to do it, why not??? It may help someone else (if not me) in the future...

    And Rex, I get the impression that the command processor iteratively(?)/recursively(?) processes the command lines passed to it (only in batch files?) until there are no more changes - and I assume that's to handle such things as variables that contain variables, for instance (although I'm not sure without thinking about it more deeply than I care to at the moment how one would even do that). Is that what's going on here and why is that going on if that's the case? This is the first (of many!) languages that I've used that did not have a clear-cut distinction between program code and data (although most other languages do not allow you to build and immediately execute code - and I have had that need from time to time, but not often).
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,854
    Likes Received:
    83
    No, it doesn't.

    The command processor parses each line only once (though if you have nested variables they will be resolved).

    The help file has details on exactly how the line is parsed (see "Command Parsing").
     

Share This Page