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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ec3c155a33990ec6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: "out" and "in out" Date: Mon, 26 Jul 2004 13:30:11 +0200 Organization: AdaCL Message-ID: <1150612.FPCVxyNjoV@linux1.krischik.com> References: <4104d5de@dnews.tpgi.com.au> Reply-To: krischik@users.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 8Bit X-Trace: news.t-online.com 1090843261 00 9619 tcMOXAI6Ae8NCAv 040726 12:01:01 X-Complaints-To: usenet-abuse@t-online.de X-ID: Vrv6IcZEwet+XOldKiTr0Lu0GwChlvAqVrcF9Tjc9v+hgkVz46j4EN User-Agent: KNode/0.7.7 Xref: g2news1.google.com comp.lang.ada:2397 Date: 2004-07-26T13:30:11+02:00 List-Id: zork wrote: > now I get as a result "CUT", and i dont understand why i get this result. > Doesnt the "out" specify that its initial value isnt passed in via the > parameter? But it seems to be passed in the above. In fact the "out" is > acting like an "in out". I am a little confused. Could someone shed some > light on this? No it means: Does not *need* to be passed in. However, if using a pointer instead of the value gives better performance the compiler will do that. Also there are types which for technical reasons need to be passed using a pointer. What you have done comes under "undefined beahavior". If you used: type s_type is new string (1 .. 3); s : s_type = "CAT"; procedure modify ( s1 : out s_type) is begin ���s1(2)�:=�'U'; end modify; things *might* be different on standart CPU's since s_type is smaller then 32 bit. BTW: String is indefinite and size therefore undefined. With Regards Martin -- mailto://krischik@users.sourceforge.net http://www.ada.krischik.com