Navigation:  ThinBASIC Modules > Core (thinBasic Core Engine) > Variables functions >

Swap

Previous pageReturn to chapter overviewNext page

 

Description

 

Swap the content of two variables.

 

Syntax

 

Swap Var1, Var2

Swap (Var1, Var2)

 

Returns

 

None

 

Parameters

 

Name

Type

Optional

Meaning

Var1

Any

No

Any variable name.

Var2

Any

No

Any variable name.

 

Remarks

 

Restrictions

 

Var1 and Var2 must be single variable names already declared.

Expressions will generate a runtime error.

 

See also

 

Examples