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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ec3c155a33990ec6 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Marc A. Criley" Newsgroups: comp.lang.ada Subject: Re: "out" and "in out" Date: Mon, 26 Jul 2004 09:16:46 -0500 Message-ID: <2mki2jFn80o0U1@uni-berlin.de> References: X-Trace: news.uni-berlin.de GcBoJfYbHKClPCrAjCZ8SQ+lHIdH78L/mBtyDFHicg9VANrYuB X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:2399 Date: 2004-07-26T09:16:46-05:00 List-Id: "Christoph Karl Walter Grein" wrote: > > In your case, the passing mechanism is by reference, so you get what you get. But don't rely on this, rely only on the mode, i.e. the parameter st is undefined upon entering the procedure modify, so when you only write component 2, upon return, only component 2 has been written. Under slight variations, the result of your code might be U. > > Another thing: Don't rely upon s1'First = 1. Component 2 might not exist. While you can't rely on the initial _value_ of the parameter, you _can_ rely on getting accurate information about it from its attributes. As Christoph notes, while s1'First may not be 1, s1'First will correctly reflect the argument's index's first value, similarly for s1'Last and s1'Length--in this case, 3. And so on for other relevant attributes. Marc A. Criley McKae Technologies www.mckae.com