subroutine swap_n(a,b);
outargs a, b;
h = a;
a = b;
b = h;
endsub;
subroutine swap_c(a $,b $);
outargs a, b;
h = a;
a = b;
b = h;
endsub;
length a b $6; /* variables to be swapped must have the
same length, otherwise truncation will occur */
x = 1;
y = 2;
a = 'Mickey';
b = 'Mouse';
put _all_;
call swap_n(x,y);
call swap_c(a,b);
put _all_;