From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a1a88c4d509f6381 X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: scope and/or parameters (beginner) Date: 1999/04/06 Message-ID: #1/1 X-Deja-AN: 463196975 References: <37064309.889106243@news.dsuper.net> <37084459.8616007@rocketmail.com> <370b0c99.1137352783@news.dsuper.net> NNTP-Posting-Date: Tue, 06 Apr 1999 03:31:04 PDT Newsgroups: comp.lang.ada Date: 1999-04-06T00:00:00+00:00 List-Id: fluffy_doo@dsuper.net writes: > It looks like I am forced to declare a *new variable* in One_Procedure > to which I will give the value of Var_2 (Ex: modif_Var_2 := Var_2;), > and then send modif_Var_2 in Internal_Procedure to be modified and > brought back via its "IN OUT" parameter. Yes, that is what you have to do. There is one advanced technique you can use to modify an in parameter, and that is to use package System.Address_To_Access_Conversions. That is how the function Random is implemented for the random number generators. However, I'm telling you this so you know how to do it, in case you happen to need it -- which should only be in rare circumstances. There are a few examples of how to use this package in the ACM patterns archive, described below. (When using the archive, use the search facility to perform a substring search, say, for the string "address_to_access_conv".) > Thanks again. How come the people in this group are so helpful and > straight forward, much more than in other groups I've frequented > before ? Is this part of some organized campain with the purpose of > popularizing Ada ? It is a if the people here were paid to do it and > truly enjoyed it on top of it ! That about sums it up! If you want more examples of Ada95 programming, then you can browse the ACM patterns archive. You can subscribe to that list by sending a message (body) subscribe patterns to the ACM mailing list server.