What steps will reproduce the problem? set * set x=8 set x=2 && set y=%x% && set
What is the expected output? What do you see instead? x=2 y=8 #??????
What version of the product are you using? any
Comment #1
Posted on Feb 9, 2012 by Happy HippoFirstly you must understand the manner that variables are expanded and how batch scripts are interpreted.
Batch scripts are read line-by-line. Any variables are replaced with their values and then the line is executed; variables are updated after each line is interpreted.
Is the same as WINDOWS CMD.EXE, try it in cmd.exe you will get the same result。
Comment #2
Posted on Mar 18, 2012 by Happy BearOK! Thanks! but:
set * set x=8 set x=2 && call set y=%x^% #x=2 y=2 OK!
Comment #3
Posted on Mar 19, 2012 by Happy HippoYes,because call will get new line to run.
Status: Done
Labels:
Type-Defect
Priority-Medium