Welcome!

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

SignUp Now!

environment variable syntax

Oct
358
2
I know I must be missing something here but why does

echo %programfiles(x86) show c::\program files(x86)

but if I set

set foo(bar)=1

echo %foo(bar) show (bar)
 
Rex is special-casing the PROGRAMFILES(X86) variable. TCC does not generally support parentheses in variable names; that one gets special treatment. Oh, and it looks like COMMONPROGRAMFILES(X86) too.

If you really want to use parentheses in variable names, enclose the name in brackets:
Code:
echo %[foo(bar)]
 
Rex is special-casing the PROGRAMFILES(X86) variable. TCC does not generally support parentheses in variable names; that one gets special treatment. Oh, and it looks like COMMONPROGRAMFILES(X86) too.

If you really want to use parentheses in variable names, enclose the name in brackets:
Code:
echo %[foo(bar)]
yes --- that is what I been doing .--- %[foo(bar)]
 

Similar threads

Back
Top