Welcome!

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

SignUp Now!

WAD Function @FULL Behaving Radically Differently

Jun
562
4
Many of my scripts use the @FULL function to get fully qualified standard path names for directories and files to pass to programs that do not know about directory aliases. Suddenly they have stopped working. Here are simple examples that illustrate the problem. The first shows TCC version 30; the second one the latest version.

[TCMD30.00.22 | C:\Users\Jay\Dropbox]
>echo %@full[tmp:*]
C:\temp\*

[TCMD32.10.20 | C:\]
>echo %@full[tmp:*]
C:\tmp:*

I hope this is a bug and not a complete reformulation of what the @FULL function is supposed to do.
 
It's the word "tmp:" itself. And @TRUENAME does it too. It's also broken in v31 (OK in v30).

Code:
v:\> alias tmp:
c:\temp\

v:\> do x in /p alias *: ( echo %@truename[%@word["=",0,%x]] )
D:\data\tcchistory\
D:\data\tcclibrary\
C:\Users\vefatica\
D:\data\tccplugins\
C:\Users\vefatica\Favorites\
C:\Users\vefatica\Desktop\
C:\users\vefatica\documents\
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\
tmp:
 
Yes, of course. TMP: has become a special device. It is still works as a directory alias in many (but not all) circumstances.

I'm not sure what the proper solution is. It might be very hard to prevent its being treated as a device in some commands and functions where it should work as a directory alias. CLIP: has the same issue (but I didn't define that as a directory alias).

I may have to eliminate that alias definition, search for its use in any scripts, and try to retrain my mind after using it ever since directory aliases were added to TCC.
 
I just changed the directory alias from TMP: to TEMP: and replaced the references to TMP: in all my batch files (there were only three, and, in fact, I should be changing them to use the TMP: device instead of temporary files created in the temp directory).

Training my mind and fingers to write TEMP: instead of TMP: will be harder :smile:
 

Similar threads

Back
Top