Name:
swap
Syntax:

SWAP variable1, variable2

Description:

Swap the values between two variables. The swap command simply exchanges values between two variables.

Applies To:
08M2, 14M2, 18M2, 20M2, 20X2, 28X1, 28X2, 40X1, 40X2
See Also:
Related Create:
    Share:
    Print:

    Swap two variables

    Swap b1 and b2's values, then display the results

    Code Example:
    	b1 = 5
    	b2 = 10
    
    main:	swap b1,b2
    	debug
    	pause 1000
    	goto main
    Copy Code Submit an Example

    Submit Your Own Code!

    You must be logged in to submit code examples. Login now.

    Comments

    • Login to leave a comment.