Lexikos is saying something along the lines that these examples will describe:
Code: Select all
A=%0% ; Will contain the passed amount of parameters (which is ALSO the final var containing passed parameters)
; For example, if passing 7 parameters, %0% will contain 7 which is the last passed var %7%.
A:=0 ; Simply assigns "A" the value of 0 (or essentially null in certain circumstances)
A:=%0% ; Passes the value contained in 0 (i.e. the total number of parameters [which is equivalent to the last parameter filled] as shown in example 1)
; as a variable. This means that if 7 parameters are passed, it will pass whatever is in the 7 variable.
A:=7 ; Though intuitively this would allow passing the same as the above, this is not the case, as it passes the number 7 only.
A:=%1% ; This variable contains the data of the passed parameter 1, and that data does not have a "value" so the double-dereferencing will result in an empty assignment.
Given, for example, that 1 is passed as a parameter with the string "Parameter1Data" on running, using
Parameter1Data:="This Works"
Will allow the previous example A:=%1% to correctly be filled.
Someone please correct me if I'm wrong.