問題タブ [delayedvariableexpansion]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
batch-file - Parsing incomming parameters in batch inside for loop with shift
I am trying to write "bootstrapper" script which parses and passes arguments into further applications in my framework. The minimal, reproducable example below, actual application is much more complicated
The basic syntax for that script is
#xA;and it should call
#xA;The problematic fragment is this nested for-loop:
#xA;The problem is arguments
are equals to 1 1 1
instead of 1 test2 true
after executing this loop.
I believe the inner loop is pre-populated with %~3
being set as foo=1
and ignoring the shift command. I cannot change shift
as I need to support 9+ arguments, nor can I remove outer loop (for other reasons).
The question is - can I have delayed expansion for script arguments?