Or how can I implement a SWAP(x,y) function in SB?
This doesn't work for me as I thought it might...
a=1 ! b=2
PRINT a,b
swap(a,b)
PRINT a,b
END
DEF swap(x,y)
temp=x
x=y
y=temp
ENDDEF
Many thanks!
Mark
Search found 1 match
- Sun Nov 05, 2023 4:48 am
- Forum: Other topics
- Topic: Does SB have a SWAP function?
- Replies: 1
- Views: 2122
- Flag: