Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Cobol
IDENTIFICATION DIVISION.
PROGRAM-ID. swap.
PROCEDURE DIVISION.
    MOVE a    TO temp
    MOVE b    TO a
    MOVE temp TO b
STOP RUN.
procedure swap(a, b: in out Integer)
is
    temp : Integer;
begin
    temp := a;
    a := b;
    b := temp;
end swap;

New implementation...
programming-idioms.org