[Cst-1b] About Algol
Stefan
sjr48@cam.ac.uk
Fri, 12 May 2000 08:22:49 +0100
How about looking at it this way - we specify the types and modes once we
have entered the function ... but there is no guarantee that they match up
with how this variable is used in other places. When we have
real procedure transpose(A, m)
value m;
there is no guarantee that m actually has been called by value. We just
tell the compiler that for the rest of this function it should treat it
thus.
This is only a guess though - I haven`t looked it up
STef
>
>Martin Harper wrote:
>>
>> On page 16 of comp.prog.lang(5.8), one of the trouble spots of ALGOL is
>> claimed to be -
>> "The types and modes of calling procedure arguments could not be
specified."
>>
>> however, looking at the code fragments, it seems that you can - for
example,
>> over the page there is a "transpose" procedure, which runs as -
>>
>> real procedure transpose(A, m)
>> value m;
>> real array A; integer m;
>> begin
>> ...
>> end
>>
>> this clearly implies to me that the mode of calling is that m is by val,
A by
>> name, and that m is an integer, while A is a real array.... what have I
>> forgotten/misunderstood? :(
>
>Nothing, as far as I can see! This does seem to be a contradiction in
>the notes and as no one else on this list seems to be able to provide an
>answer either, perhaps you should e-mail MR and ask him what he meant.
>If you get an answer, could you share it with the rest of the list
>please?
>
>--
>Nathan
>Jesus College, Cambridge, CB5 8BL
>http://www-jcsu.jesus.cam.ac.uk/~ned21/
>
>