On 13/02/18 17:09, Seymour J Metz wrote:
Something just occurred to me with regard to call by name. There are
no SETS and USES  attributes in an Algol 60 parameter declaration. If
a parameter is used as an l-value, there is a potential problem. A
value like A[I] is legitimate on either side of an assignment, but a
value like A[I]+1 is valid only on the right.

Someone on this list that the implementation of call by name would
pass two functions (addresses of blocks of code): one which computed
the value of the parameter in the caller's environment
and the other computed the address to store a value.
For a parameter like A[I]+1 which cannot be assigned to,
the second function would cause a runtime error.


Dr Martin Ward | Email: mar...@gkc.org.uk | http://www.gkc.org.uk
G.K.Chesterton site: http://www.gkc.org.uk/gkc | Erdos number: 4

Reply via email to