FutureBasic Logo

<<    Index    >> FutureBasic 5

swap   statement



Syntax:
swap variable1, variable2

Description:
swap exchanges the contents of the two indicated variables. Both variables must be of the same type.

Example:
varOne% = 1200
varTwo% = 999
print varOne%, varTwo%
swap varOne%, varTwo%
print varOne%, varTwo%

program output:
1200 999
999 1200


See Also:
let; Appendix C -Data Types and Data Representation