Problem with VSDevCmd.bat in VS 16.7.3

Sep 10, 2009
40
0
I have problems with a VSDevCmd.bat in my TCC 26.00.31

The following line eliminates the equal sign.
set "%__NORMALIZE_VAR%=%__NORMALIZE_VAR_CONTENT:~0,-1%"
This lines expands to something like

set LIB^__NORMALIZE_VAR_CONTENT:~0,-1

Why?
My fix is this:

set "__NORMALIZE_VAR=%1"
call set "__NORMALIZE_VAR_CONTENT=%%%__NORMALIZE_VAR%%%"

if "%__NORMALIZE_VAR_CONTENT:~-1%"==";" (
if not "%_4VER%"=="" (
set "%__NORMALIZE_VAR%%@char[%@ascii[=]]%__NORMALIZE_VAR_CONTENT:~0,-1%"
) else (
set "%__NORMALIZE_VAR%=%__NORMALIZE_VAR_CONTENT:~0,-1%"
)
)
set "__NORMALIZE_VAR="
set "__NORMALIZE_VAR_CONTENT="
 
Sep 29, 2021
3
0
Hi,

I know this was reported long time ago but just found this problem myself and got a simpler work-around.

The problem seems to be the expansion of %= which is a pseudovariable that expands to the current escape character (see = TCC internal pseudovariable).

The documentation says this pseudovariable "has been obsolete for years" but its use seems to be enabled by default.

Workaround

Tell TCC not to expand those pseudovariables that has been obsolete for years.

If you use the OPTION command you may find a "Expand Pseudovariables" check box for this on the "Special Characters" group. However, at least on my installation (TCC LE 14.00.9 x64 Windows 10 [Version 6.3.22000]) the check box is disabled and could not find a way to modify it.

An alternative way is to edit the TCMD.INI file. You'll find the path to this file on the title of the same configuration dialog started from the OPTION command. On the TCMD.INI file look for a line that says

ExpandPseudovariables=Yes

and simply change it to

ExpandPseudovariables=No

Hope this helps other users,
 

Similar threads