Re: swapping two numbers

[email protected] ("Leonid Grinberg")
Newsgroups perl.fwp
Message-ID <[email protected]>
> not in-place cause it's 3 lines, but does not use an external temporay
> value, and should be language-independent:
>   x = x + y
>   y = x - y
>   x = x - y
> (IIRC my high school BASIC teacher taught us that)

Yeah, that works. Who said that it can't be 3 lines.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.