Description: |
Instead of using "global" variables for return value, the function can use one of it`s arguments as
variable reference. The caller can then pass a variable name to the function and the function can
store the result into this variable making use of the command line expansion of the command processor:
Note: The var1 variable is not reserved for this articular function. Any variable
can be passed to the function the caller has full control. |
Usage: |
1. 2.
|
call:myGetFunc var1
echo.var1 after : %var1%
|
|
Script: |
|
Script Output: |
Script Output | var1 after : DosTips
| |