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

16 lines
338 B
Text

declare swap generic (
swapf when (float, float),
swapc when (char, char));
swapf: proc (a, b);
declare (a, b, t) float;
t = a; a = b; b = t;
end swapf;
swapc: proc (a, b);
declare (a, b) character(*);
declare t character (length(b));
t = a; a = b; b = t;
end swapc;
declare (r, s) character (5);
call swap (r, s);