Re: random numbers
- Posted by Juergen Luethje <j.lue at g??.de> Nov 22, 2007
- 557 views
Hi Jason, you wrote: <snip> > Does any other compiled or interpreted language have a built-in swap? Oh yes, oh yes! > I can't > recall coming across one, even though it is a pretty common operation. It is implemented in many BASIC flavours: SWAP a, b Also interesting in this regard is Lua. Lua allows multiple assignment in one command, e.g.: a, b = 1, 3 which is the same as: a = 1 b = 3 This feature can be used for swapping: a, b = b, a No joke, that actually works fine in Lua. Cool, no? Regards, Juergen