echo 2. %%var3%%
echo 3. %%%var3%%%
echo on so I can try to make better sense of the batch processing, though it really seems to be limited in parsing info.
When echoing a variable, are the inner/center parts processed first?
I’m trying to understand how multiple percents signs are exactly parsed when surrounding a variable.
I know every other percent symbol cancels out the previous one, but there must be more to it because I can never seem to get the result I think I should.
The logic seems to hold true when I do a simple echo using double percents %%, like so:
The outer percent symbol is canceled, and it outputs with single percents:
So, when I use 3 %%%, I would think it would return
%%var3%%, since ONLY the middle percent of the 3 %%% should be canceled, yet the result is:
So, obviously I’m not fully understanding how multiple percents surrounding a variable are processed.
When using 2 %%, does the 2nd % cancel the entire process of reading the value from
Because how else could the result be
%var3% rather than
And b/c the extra % when using 3 %%%, it re-allows the process of reading the value from
var3, which can now extract the value from
var3, which is
var2, and then simply apply the remaining single %s around it to give the final result:
Am I close or still grasping at straws? Any clarification or suggestions would be appreciated.