RosettaCodeData/Task/Generic-swap/PL-I/generic-swap-4.pli
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

15 lines
330 B
Text

begin;
dcl c char (1);
dcl sx char (1) based(px);
dcl sy char (1) based(py);
dcl i fixed bin (31);
dcl px ptr init (addr(C1));
dcl py ptr init (addr(C2));
do i = 1 to min(stg(C1), stg(C2));
c = sx;
sx = sy;
sy = c;
px = px + 1;
py = py + 1;
end;
end;