renan-guimaraes / dwscript

Automatically exported from code.google.com/p/dwscript
0 stars 0 forks source link

Add Swap() function #285

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
From C. Budde

I think that Swap() would be a good candidate as build-in function. It
would exchange the content of a and b and should be defined for Integer,
Float and Variant.

Original issue reported on code.google.com by zar...@gmail.com on 2 Jul 2012 at 7:27

GoogleCodeExporter commented 9 years ago
Delphi has the Swap() name squatted by a (rather useless) bytewise function.

But the name could be taken over and the capability generalized to any types 
(ie. including classes, interfaces, records, etc.)

Original comment by zar...@gmail.com on 2 Jul 2012 at 7:28

GoogleCodeExporter commented 9 years ago
Added

Original comment by zar...@gmail.com on 11 Jul 2012 at 7:21