Welcome!

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

SignUp Now!

Problem with VSDevCmd.bat in VS 16.7.3

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="
 
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,
 
Simply change the line

Code:
set "%__NORMALIZE_VAR%=%__NORMALIZE_VAR_CONTENT:~0,-1%"

into

Code:
set "%__NORMALIZE_VAR% = %__NORMALIZE_VAR_CONTENT:~0,-1%"
 
Will that really work correctly? After set zzz = xxx I have a variable whose name is "zzz " and whose value is " xxx".
 
Back
Top
[FOX] Ultimate Translator
Translate