Swap

Swaps two variables.

OutputVar := Swap(Variable, Variable)
Command  Example: Swap Var1, Var2
Function Example: Success := Swap(Var1, Var2)

Parameters

OutputVar

The name of the variable in which to store true if variables were swapped successfully or empty string otherwise.

Variable

User Variable.

Variable

User Variable.

Remarks

Only normal variables are supported, built-in or Alias (ByRef function parameters) are not allowed.

Examples

a:=[1,2,3]
b:=BufferAlloc(100)
StrPut("Hello World!",b.Ptr)
MsgBox Swap(a,b)
MsgBox StrGet(a.Ptr)
for k,v in b
  MsgBox k "`n" v