Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Groovy
(a, b) = [b, a]

Multiple assignment: assign the values contained in the list on the right-hand side to the two variables on the left hand side
procedure swap(a, b: in out Integer)
is
    temp : Integer;
begin
    temp := a;
    a := b;
    b := temp;
end swap;

New implementation...
programming-idioms.org