C question
Goldilocks
lspirkov at udenva.UUCP
Fri Apr 19 13:50:55 AEST 1985
In article <> kjm at ut-ngp.UUCP (Ken Montgomery) writes:
>[]
>
>From: lspirkov at udenva.UUCP (Goldilocks)
>>In article <> jack at boring.UUCP (Jack Jansen) writes:
>>>
>>>procedure p(var i:integer):integer;
> ^^^
>>>begin
>>> p := i;
>>> i := i+1;
>>>end (* p *);
>>>
>>
>>you obviously don't know your pascal! a function returns
>>something. a procedure doesn't.
>>
>> Goldi
>
>The 'var' keyword has the effect that the value of 'i' is assigned
>to the corresponding actual parameter in the calling routine at the
>termination of the called routine.
>
>Ken Montgomery "Shredder-of-hapless-smurfs"
I wasn't talking about the var parameters. i was talking
about his syntax. try running that bit of code (with
a main program & the rest of the skeleton) and see what you
get...
Goldi
ps: what it should have been was:
function p(var i:integer):integer;
^^^^^^^^
...
pps: i got mail from someone at harvard but i couldn't
reply straight to him. so this is just for him:
you're right. i don't know my modula-2. i
never claimed i did. but he specifically said pascal.
More information about the Comp.lang.c
mailing list