When the tail of the variable name followed by several equal signs
For example:
$=====
_========
Can use the set command to assign such a variable success?
If successful assignment, you can use what form do variable expansion?
When tested under WIN XP 32bit, the assignment fails;
But when under WIN7 64bit, some forms success, but others fails.
The rule is unknown.
When the variable name with an underscore _ as the first character, when the count of the tail equal signs equals to 1, 2, 5, 6, 10, 11, 14, 17, 20, and more than 20, can be successfully expanded.
And when the first character of the variable name is $, when the count of the tail equal signs reached or more than 20, it can successfully expand.
When the first character is replaced by: @ # ; also get this result.
testing code:
Code: Select all
@echo off & mode 160, 1000
set _====================================================================================================VAL
set $====================================================================================================VAL
set #====================================================================================================VAL
set @====================================================================================================VAL
set ;====================================================================================================VAL
REM will report: The syntax of the command is incorrect.
set =====================================================================================================VAL
set _
set $
pause
echo _ is [%_%]
echo _= is [%_=%]
echo _== is [%_==%]
echo _=== is [%_===%]
echo _==== is [%_====%]
echo _===== is [%_=====%]
echo _====== is [%_======%]
echo _======= is [%_=======%]
echo _======== is [%_========%]
echo _========= is [%_=========%]
echo _========== is [%_==========%]
echo _=========== is [%_===========%]
echo _============ is [%_============%]
echo _============= is [%_=============%]
echo _============== is [%_==============%]
echo _=============== is [%_===============%]
echo _================ is [%_================%]
echo _================= is [%_=================%]
echo _================== is [%_==================%]
echo _=================== is [%_===================%]
echo _==================== is [%_====================%]
echo _===================== is [%_=====================%]
echo _====================== is [%_======================%]
echo _======================= is [%_=======================%]
echo _======================== is [%_========================%]
echo _========================= is [%_=========================%]
echo _========================== is [%_==========================%]
echo _=========================== is [%_===========================%]
echo _============================ is [%_============================%]
echo _============================= is [%_=============================%]
echo _============================== is [%_==============================%]
echo _=============================== is [%_===============================%]
echo _================================ is [%_================================%]
echo _================================= is [%_=================================%]
echo _================================== is [%_==================================%]
echo _=================================== is [%_===================================%]
echo _==================================== is [%_====================================%]
echo _===================================== is [%_=====================================%]
pause
echo $ is [%$%]
echo $= is [%$=%]
echo $== is [%$==%]
echo $=== is [%$===%]
echo $==== is [%$====%]
echo $===== is [%$=====%]
echo $====== is [%$======%]
echo $======= is [%$=======%]
echo $======== is [%$========%]
echo $========= is [%$=========%]
echo $========== is [%$==========%]
echo $=========== is [%$===========%]
echo $============ is [%$============%]
echo $============= is [%$=============%]
echo $============== is [%$==============%]
echo $=============== is [%$===============%]
echo $================ is [%$================%]
echo $================= is [%$=================%]
echo $================== is [%$==================%]
echo $=================== is [%$===================%]
echo $==================== is [%$====================%]
echo $===================== is [%$=====================%]
echo $====================== is [%$======================%]
echo $======================= is [%$=======================%]
echo $======================== is [%$========================%]
echo $========================= is [%$=========================%]
echo $========================== is [%$==========================%]
echo $=========================== is [%$===========================%]
echo $============================ is [%$============================%]
echo $============================= is [%$=============================%]
echo $============================== is [%$==============================%]
echo $=============================== is [%$===============================%]
echo $================================ is [%$================================%]
echo $================================= is [%$=================================%]
echo $================================== is [%$==================================%]
echo $=================================== is [%$===================================%]
echo $==================================== is [%$====================================%]
echo $===================================== is [%$=====================================%]
pause