Welcome!

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

SignUp Now!

Why doesn't "IDE %_ININAME" work?

May
12,846
164
When I
Code:
v:\> ide %_ininame
IDE gives me a message box saying it can't find "v:\%_ininame".
Why doesn't IDE expand variables on its command line? (BDEBUGGER does, TCC does when it passes arguments to every other "generic file editor" I know of).
 
WAD. If you're debugging or editing batch files, you should be using BDEBUGGER. IDE is intended for other types of scripts (Python, Lua, REXX, etc.) where you probably don't want to treat a % as a TCC variable, or to expand variables prematurely.

If you're trying to edit an .INI file, there's no reason to be doing it in IDE (or BDEBUGGER). You can't use the syntax coloring, and you can't debug it. But if you're *really* determined to do it:

Code:
call ide %_ininame
 
That doesn't make any sense to me. The help says "The IDE command is intended as a generic file editor". Wouldn't you expand variables on the command line of ANY OTHER GENERIC FILE EDITOR? What do you mean by "expand variables prematurely" when you're talking about the names of "other types of scripts (Python, Lua, REXX, etc.)"? We're talking about the names of files (which can be in variables everywhere else in TCC). It would make more sense if BDEBUGGER didn't expand variables on its command line and IDE did (but it's the opposite).

If a file name is in %VAR, it's expanded in all these cases.
notepad %var
textpad %var
bdebugger %var
hworks32.exe %var
edit.com %var

What's gained by IDE not doing the same? Please give an example.
 
Variable expansion also seems to be treated differently by TCC/LE than by TCC. In the latter, via options cmd, TCSTART / TCEXIT Path can be set to: %localappdata%\JPSoft\ (which is where the TCMD.ini file is by default). However, TCC/LE will Not expand the variable. Granted, it is possible that Win versions are implicated. TCC/LE 13 is running under Win7SP1, and TCC 15 is running under Win8.1
 
Variable expansion also seems to be treated differently by TCC/LE than by TCC. In the latter, via options cmd, TCSTART / TCEXIT Path can be set to: %localappdata%\JPSoft\ (which is where the TCMD.ini file is by default). However, TCC/LE will Not expand the variable. Granted, it is possible that Win versions are implicated. TCC/LE 13 is running under Win7SP1, and TCC 15 is running under Win8.1

That feature was added to a later version of TCC. New TCC features are not back-ported to TCC/LE.
 

Similar threads

Back
Top