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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,6122265fe3a60a37 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-07 01:15:04 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!oleane.net!oleane!nnrp.oleane.net!not-for-mail From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Some problems with string type(Exact String?) Date: Thu, 7 Jun 2001 10:07:51 +0200 Organization: Adalog Message-ID: <9fnd1q$bii$1@s1.read.news.oleane.net> References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 991901562 11858 195.25.228.57 (7 Jun 2001 08:12:42 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 7 Jun 2001 08:12:42 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:8290 Date: 2001-06-07T10:07:51+02:00 List-Id: a �crit dans le message news: whxT6.68591$%i7.51923767@news1.rdc1.sfba.home.com... > >not greater than the bounds of the array. My first hunch on the way to > >work with this strictness(or so it seems) would be keep count of the > >number of elements (characters of a string, numbers, whatever) going into > >the array, and then pad the rest of the array with with NULLs or something > In Barnes, look at the chapter "Predefined Library", section "Characters > and strings" and you'll see Ada.Strings.Bounded (and Ada.Strings.Unbounded). > Bounded strings essentially keep a "current length", along with the fixed > length array. There's no need then to pad with nulls or anything else. > Alternatively, you can use the Variable_String package that is available on Adalog's components page: http://www.adalog.fr/compo2.htm Note that this package is pure, which (unlike the other packages) makes it usable for distributed applications. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr