comp.lang.ada
 help / color / mirror / Atom feed
From: Corey Ashford <yeroca@rocketmail.com>
Subject: Re: scope and/or parameters (beginner)
Date: 1999/04/05
Date: 1999-04-05T00:00:00+00:00	[thread overview]
Message-ID: <37084459.8616007@rocketmail.com> (raw)
In-Reply-To: 37064309.889106243@news.dsuper.net

fluffy_pink@dsuper.net wrote:
[snip]
> 
> If for "(QUESTION)" I use "Second_Variable" the compiler tells me that
> for an OUT or an IN OUT I must have an actual parameter that **is a
> variable***.  I don't understand why it tells me this.

"IN" parameters are considered read-only.  You've tried to pass it to
a procedure which may attempt to change its value - something that
isn't allowed to a read-only variable.  Treat "IN" parameters as
constants that are defined when the subprogram is invoked.

[snip]
> 
> How can I pass the value of Var_2 from my main program, into
> One_Procedure, and then from One_Procedure into Internal_Procedure,
> and then to make it come back out modified (IN OUT) so that it will
> end up in One_Proc�dure ?  I don't want to use the modified value of
> Var_2 (modified by Internal_Procedure) at the main program level; I
> want to use it only in One_Proc�dure.

[snip]

Well, you could change the definition of One_prog so that its
Second_Variable is of type "IN OUT The_Type", instead of just IN.  Then
you could call Inner_Procedure legally with Second_Variable.



- Corey




  parent reply	other threads:[~1999-04-05  0:00 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-02  0:00 scope and/or parameters (beginner) fluffy_pink
1999-04-03  0:00 ` Matthew Heaney
1999-04-05  0:00 ` Corey Ashford [this message]
1999-04-05  0:00   ` fluffy_doo
1999-04-06  0:00     ` Matthew Heaney
1999-04-08  0:00     ` czgrr
1999-04-10  0:00       ` fluffy_puff
1999-04-12  0:00       ` dennison
1999-04-13  0:00         ` Robert Dewar
1999-04-13  0:00         ` czgrr
1999-04-13  0:00           ` Robert Dewar
1999-04-14  0:00             ` czgrr
1999-04-14  0:00               ` Robert Dewar
1999-04-15  0:00                 ` czgrr
1999-04-15  0:00                   ` Robert Dewar
1999-04-14  0:00               ` dennison
1999-04-13  0:00     ` Robert A Duff
1999-04-14  0:00       ` Robert Dewar
1999-04-14  0:00         ` Hyman Rosen
1999-04-14  0:00           ` dennison
1999-04-14  0:00             ` Hyman Rosen
1999-04-14  0:00               ` dennison
1999-04-14  0:00                 ` Hyman Rosen
1999-04-15  0:00                   ` dennison
1999-04-15  0:00                     ` Robert Dewar
1999-04-15  0:00                       ` dennison
1999-04-15  0:00                       ` Hyman Rosen
1999-04-15  0:00           ` Robert Dewar
1999-04-15  0:00             ` Hyman Rosen
1999-04-15  0:00               ` Robert Dewar
1999-04-15  0:00                 ` Hyman Rosen
1999-04-16  0:00               ` Rakesh Malhotra
1999-04-15  0:00       ` fluffy_dong
1999-04-15  0:00         ` Robert Dewar
1999-04-15  0:00           ` dennison
1999-04-15  0:00             ` fluffy_dong
1999-04-16  0:00               ` Robert Dewar
1999-04-16  0:00                 ` Fraser Wilson
1999-04-16  0:00                   ` Gautier.DeMontmollin
1999-04-20  0:00                     ` Nick Roberts
1999-04-21  0:00                     ` fraser
1999-04-22  0:00               ` Robert A Duff
1999-04-22  0:00                 ` Larry Kilgallen
1999-04-16  0:00         ` Samuel Mize
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox