Swap operator ?

Matti Niemenmaa see_signature at for.real.address
Wed Oct 10 14:18:31 PDT 2007


BLS wrote:
> Not really nessesary, but nice to have...
> int a = 1;
> int b = 2;
> a <=> b // a == 2, b == 1

Or multiple return values, and then:

a, b = b, a;

-- 
E-mail address: matti.niemenmaa+news, domain is iki (DOT) fi



More information about the Digitalmars-d mailing list