|
Swap | ||||
Swap NumericVar1, NumericVar2 | ||||
Parameters: NumericVar1 = first numeric variable NumericVar2 = second numeric variable |
||||
Returns: NONE | ||||
Swap swaps the values of two numeric variables. If the data type of both variables are not the same PlayBASIC will cast them automatically. FACTS: * Swap does not support string variables. * Swap exchanges the contents of two variables, so it's short hand for the following.
is the same as,
Mini Tutorial: In this example we'll define two variables called A and B. These variable will then be displayed on the screen both before and after they're swapped.
This example would output.
|
Related Info: | Float | IF | Integer | SwapIfHigher | SwapIfLower | Variables : |
|
|||||||||||||||||||||||||||||||||||||||
(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com |