Futurebasic/Language/Reference/swap

From Wikibooks, open books for an open world
< Futurebasic‎ | Language‎ | Reference
Jump to: navigation, search

SWAP[edit]

Syntax[edit]

SWAP variable1, variable2

Description[edit]

SWAP exchanges the contents of the two indicated variables. Both variables must be of the same type.

Example[edit]

varOne% = 1200
varTwo% = 999
PRINT varOne%, varTwo%
SWAP varOne%, varTwo%
PRINT varOne%, varTwo%

program output:
1200 999
999 1200

See Also[edit]

LET; Appendix C:Data Types and Data Representation