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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-01 17:21:55 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: bam@snoopy.apana.org.au (Brian May) Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: 1 Aug 2002 17:21:55 -0700 Organization: http://groups.google.com/ Message-ID: <29e5ffff.0208011621.3193755f@posting.google.com> References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <29e5ffff.0207302052.465a3193@posting.google.com> <4519e058.0208010809.6a4c5e22@posting.google.com> NNTP-Posting-Host: 203.25.148.61 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1028247715 16771 127.0.0.1 (2 Aug 2002 00:21:55 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 2 Aug 2002 00:21:55 GMT Xref: archiver1.google.com comp.lang.ada:27590 Date: 2002-08-02T00:21:55+00:00 List-Id: dennison@telepath.com (Ted Dennison) wrote in message news:<4519e058.0208010809.6a4c5e22@posting.google.com>... > > The analogous routine is Ada.Strings.*.Find_Token (where * is your > choice of "Fixed", "Bounded", or "Unbounded"). I haven't been able to find any documentation on how to use these functions... (except the function declaration). Also something else I have been trying to work out, is how to replace, say all instances of "/" in a string with, say "__". There is a replace function for the strings, I am a bit doubtful though if you can use it to expand the size of a fixed string... So I have a number of ideas of the best way, I am not really sure which is the most efficient though. > I'm not a big fan of these kinds of renames. Why not instead just > write: > > Put_Line (Class_Name (Package_ID, Get_Attribute (Value (I), "ref")) & > "($1,$2,$3)"); Because if I need to use it multiple times, I think that means it will have to call get_attribute multiple times, won't it? Besides, I don't think the above makes it very clear what the significance is of the results of each function call. > I think that's much easier to read than your 4 line (semicolon) > declare block. > > If you insist in splitting it up, turn those renames into constants. > I'd still skip the "My_Node" one, unless you are going to use it in > more than one place. Are constants better then renames? If so, why?