Held: Friday, March 6, 1998
Give an assignment statement in an Algol-like language involving variable X such that the R-value of X is used on the left-hand-side of the assignment and the L-value of X is used on the right-hand-side of the assignment. You may choose any type you deem appropriate for X. You may also use other variables in the assignment. Again, you should indicate the type of each variable you use, especially of X.
function sum(exp, counter, start, finish)
begin
tmp = 0;
for counter = start to finish
tmp = tmp + exp;
end for
return tmp
end sum
exp is A[i] or
something similar?
sum(A[i], i, 1, 10)
swap(x,y),
which swaps the values of two variables.
swap(i,A[i]).
Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.
Source text last modified Thu May 7 20:29:40 1998.
This page generated on Thu May 7 20:34:41 1998 by SiteWeaver.
Contact our webmaster at rebelsky@math.grin.edu