ⓘ This web page is about the old AlgoSim 2 software. Perhaps you are looking for the new Algosim 3 application?
AlgoSim
Homepage | Screenshots | Gallery of Visualisation | User's Guide | Function Reference | Download | FAQ | Support | Bugs and Solutions | Donate

Reference: swap

swap(a, b) swaps the identifiers a and b. a and b are strings containing the identifiers of two variables.

swap(a, b) is equivalent to

tmp ≔ a
a ≔ b
b ≔ tmp
delete("tmp")

(where "tmp" is a preveously non-existing variable).