Turns a variable into an alias for another variable, or a non-alias.
alias(alias, alias_for)
| alias | A reference to a local variable or function parameter. |
| alias_for | A reference to or the address of a user-defined variable. |
An alias is akin to a ByRef function parameter. However, an optional ByRef parameter is not an alias when it is omitted from a function call.
Loop, 10 {
alias(item, item%A_Index%)
if item = 1 ; Compare the value of item%A_Index%.
item = one ; Set the value of item%A_Index%.
else if item = 2
item = two
;...
alias(item, 0) ; Reset item to a non-alias.
}
; Make "var" an alias for the Var structure which var_ptr contains a pointer to. ; Without +0, this would create an alias to the var_ptr variable itself. alias(var, var_ptr+0)