From: Ted Dennison <dennison@telepath.com>
Subject: Re: On functions and access types.
Date: Thu, 27 Jun 2002 02:33:12 GMT
Date: 2002-06-27T02:33:12+00:00 [thread overview]
Message-ID: <3D1A7916.5010903@telepath.com> (raw)
In-Reply-To: wccu1np36vw.fsf@shell01.TheWorld.com
Robert A Duff wrote:
> Caffeine Junky <nospam@hotmail.com> writes:
>
>
>>Now the compiler tells me that I cannot assign to an 'in' parameter.
>>However, as I understand it, a function can only take an 'in' parameter.
>
> That's right. If you want a function to modify its argument,
> you can use an access parameter, like "S: access Stack;",
> and call it with Some_Stack'Access.
..or use a pointer. C also allows only "in" parameters to functions, and
passing pointers is the standard work-around there. (C++ allows
reference parameters though).
> But in this case, it's better to use a procedure.
It almost always is.
next prev parent reply other threads:[~2002-06-27 2:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-26 22:57 On functions and access types Caffeine Junky
2002-06-27 0:25 ` Robert A Duff
2002-06-27 2:33 ` Ted Dennison [this message]
2002-06-27 1:29 ` SteveD
-- strict thread matches above, loose matches on Subject: below --
2002-06-27 7:36 Grein, Christoph
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox