Re: why only in-parameters in functions

From: stephane richard (stephane.richard_at_verizon.net)
Date: 09/29/04


Date: Wed, 29 Sep 2004 15:30:42 GMT


"Rick Santa-Cruz" <rick_santa_cruz75@msn.com> wrote in message
news:cjejo4$62e$00$1@news.t-online.com...
> Hi,
>
> I know that it is only allowed to use in-parameters with functions. But I
> can't figure out what is the idea behind this. Why did the Ada-Team only
> allow in-parameter when using functions?
>
> Thanks in advance,
> Rick
>
Maybe I can answer that, with my still very limited knowledge...and wait for
others to correct me ;-).

I would assume that since a function returns a value Out parameters would
also allow to change values outside the function. even if it's available in
other languages, it's usually recommended to not do so for good practice.
so to enforce it isn't all that bad a thing. :-).