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: Robert A Duff Subject: Re: scope and/or parameters (beginner) Date: 1999/04/13 Message-ID: #1/1 X-Deja-AN: 465972460 Sender: bobduff@world.std.com (Robert A Duff) References: <37064309.889106243@news.dsuper.net> <37084459.8616007@rocketmail.com> <370b0c99.1137352783@news.dsuper.net> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1999-04-13T00: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. That's right. The rule in some other languages (eg Pascal and C) is different -- in those languages, a parameter acts just like a local variable, so you can modify it, and it doesn't affect the caller's copy. That's error prone, which is why in Ada an 'in' mode parameter acts like a local *constant*. - Bob -- Change robert to bob to get my real email address. Sorry.