PDA

View Full Version : SWAP COMMAND extended to Longs and array variables



longpole001
- 20th October 2015, 20:43
would be nice to have the swap command be extended to support longs and array variables and not limited to its current form

Art
- 9th April 2018, 23:41
Hi :)
It’s impossible to swap a pair of RAM locations in any language on any platform without the use of an identical sized temporary RAM location.
The manual only means you don’t have to look at the mess in a BASIC program, but it still exists in the compiled result.




valuea = 3;
valueb = 6;

temp = valuea
valuea = valueb
valueb = temp

// valuea now = 6, and valueb = 9