2 swap - swap values of two variables
13 swap(x,y) assigns the value of x to a temporary location, temp say,
14 assigns the value of x to y, and then assigns the value at temp to y.
16 swap(x,y) should not be used if the current value of one of the
17 variables is a component of the value of the other; for example, after:
19 A = list(1,2,3); swap(A, A[[1]]);
21 A will have the value 2, but a three-member list remains in memory
22 with no method within calc of recalling the list or freeing the
26 > x = 3/4; y = "abc"; print x, y, swap(x,y), x, y
29 > A = list(1,2,3); mat B[3] = {4,5,6}; swap(A[[1]], B[1]); print A[[1]], B[1]