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

WAD IDE /C does not accept truename of future file

Discussion in 'Support' started by Steve Fabian, May 30, 2013.

  1. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    On my system %LOC is the directory where batch files not necessarily portable to other systems live. I normally make the directory where my .INI files are the default before I start IDE. The command below
    IDE /c %loc\newfile.btm
    results in IDE error pop-up: "C:\JPSOFT\%loc\newfile.btm contains an incorrect path".
    OTOH expanding %LOC (using the command editing keystroke) results in proper operation.
    If I interpret it correctly, all the parser needs to do is variable expansion before passing the command line to IDE, same as it does for any other executable
     
  2. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,078
    Likes Received:
    30
    IDE is an internal command. But I'd still expect its command line to undergo normal parsing. I can confirm your observations. One ramification is that if you

    set newtbm=v:\new.btm
    ide /c %newbtm

    you get a file named "%newbtm" (ouch!)
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,078
    Likes Received:
    30
    And BDEBUGGER acts badly but not quite the same. If I

    set newbtm=v:\new.btm
    bdebugger /c %newbtm

    I get a file named "%newbtm.cmd" (double whammy!).
    Code:
    v:\> set newbtm=v:\new.btm
     
    v:\> bdebugger /c %newbtm
     
    v:\> dir /k /m *.cmd
    2013-05-30  15:50              0  %newbtm.cmd
     
  4. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84

    WAD - IDE (and BDEBUGGER) do not expand variables (and never have). Like the other delayed processing commands (DO, FOR, etc.) they pass the command line as-is, and it is up to the batch file to do the parsing & expansion.
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    IDE is an external command. But like a number of internal commands, it does not expand variables.
     
  6. vefatica

    Joined:
    May 20, 2008
    Messages:
    8,078
    Likes Received:
    30
    On the contrary!
    Code:
    v:\> which ide
    ide is an internal command
    And, for IDE.EXE, TCC expands the command line as it always does for externals.
    Code:
    g:\tc15> set newbtm=v:\new.btm
     
    g:\tc15> del %newbtm
    Deleting V:\new.btm
        1 file deleted
     
    g:\tc15> ide.exe /c %newbtm
     
    g:\tc15> dir /k /m v:\new*
    2013-05-30  19:55              0  new.btm
    Why must the internal version of the command (BDEBUGGER, too) be lame?
     
  7. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    And in the case of IDE, there is no meaningful 2nd parameter - editing multiple files concurrently with IDE you can see only one at a time, and switching between them is difficult. Regardless, using the hint of invoking the IDE.EXE external directly I executed

    alias ide=%@quote[%@path[%_cmdspec]ide.exe]

    and now the command which originally was not executed as I thought it would be behaves as I expect it.
     
  8. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    No! The internal IDE just calls the external IDE.EXE in the TCMD installation directory.

    For the same reason you wouldn't want the parser to expand variables in DO or FOR before calling the command.

    This is absolutely, positively, NOT going to change -- you're 10+ years too late to alter this syntax.
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84
    It's difficult to click on another tab?
     
  10. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    It is with just the keyboard.
     
  11. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,040
    Likes Received:
    84

    You can't press Ctrl-Tab?
     
  12. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Something was wrong in my previous tests, neither ctrl-tab, nor alt-tab had worked. I have not used IDE before this week, had been happy with my 16-b editor... I still like it, but cannot use it on this system. Is there a way to set IDE to indent a new line identically to the one above?
     
    forbin likes this.
  13. forbin

    Joined:
    Dec 29, 2009
    Messages:
    25
    Likes Received:
    0
    16 bit editor? And I thought I was old-school!

    Still using Brief perhaps?
     
  14. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    YES! With over a hundred home-brew macros... and no crisp to buy CRiSP.
     

Share This Page