swap( ** var1, ** var2 )

** = all data types

The purpose of the swap method is to offer a more concise and less error prone method to swap two values than the usual code ;

if ai_from > ai_to then
integer ai_tmp
ai_tmp = ai_from
ai_from = ai_to
aii_to = ai_tmp
end if

by :

if ai_from > ai_to then #.swap( ai_from, ai_to )




Last edited Jun 1, 2015 at 9:52 PM by domangep, version 5