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-Thread: 103376,a0833bbed8752e1f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 25 Oct 2004 19:12:25 -0500 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1861614.TWv5A9FgVL@linux1.krischik.com> <4178e979_1@baen1673807.greenlnk.net> Subject: Re: Why these "Drop" parameters? (was: variable lenght strings) Date: Mon, 25 Oct 2004 19:13:51 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 Message-ID: NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-Ygues+eqcAIDV9qiX2+I0kkwHhBdZJQ4WcQxYuo1lPUZi0So8Z99SvvAEHAPVNBOsKuKz+1H4fwIa7R!LRAvcbVBJ6SOO5gR7yDTJSgkeuTd++nkGr/ySYD8dv065U6v9rl0hy7BNZ/Dgh5+qbyil0yk7Ny0 X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.20 Xref: g2news1.google.com comp.lang.ada:5700 Date: 2004-10-25T19:13:51-05:00 List-Id: I think it is a typo for the Bounded_Slice and Unbounded_Slice routines; nowhere can I find any description of what it means (the text description of these functions never mentions "Drop"). Nor do any of the meeting minutes that I checked. Could you submit your comment to Ada-Comment (e-mail it to ada-comment@ada-auth.org)? We need to get it on the record so this can be fixed. Randy Brukardt ARG Editor. "Bj�rn Persson" wrote in message news:lESed.6963$d5.58967@newsb.telia.net... Martin Dowie wrote: > Being added in Ada2005, see Ada.Text_IO.Unbounded_IO in > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00301.TXT?rev=1.12 Reading that file I see these declarations: procedure Set_Bounded_String (Target : out Bounded_String; Source : in String; Drop : in Truncation := Error); function Bounded_Slice (Source : in Bounded_String; Low : in Positive; High : in Natural; Drop : in Truncation := Error) return Bounded_String; procedure Bounded_Slice (Source : in Bounded_String; Target : out Bounded_String; Low : in Positive; High : in Natural; Drop : in Truncation := Error); procedure Set_Unbounded_String (Target : out Unbounded_String; Source : in String; Drop : in Truncation := Error); function Unbounded_Slice (Source : in Unbounded_String; Low : in Positive; High : in Natural; Drop : in Truncation := Error) return Unbounded_String; procedure Unbounded_Slice (Source : in Unbounded_String; Target : out Unbounded_String; Low : in Positive; High : in Natural; Drop : in Truncation := Error); For Set_Bounded_String it is quite obvious that Drop specifies what should happen if Source is longer than the maximum length of Target, but can anyone explain what all the other "Drop" parameters are for? In the case of Bounded_Slice, shouldn't a slice of Source always fit in Target? Aren't they the same type, with the same max length? Unbounded strings are supposed to be unbounded. Their only limit should be the available memory, no? So, are the "Drop" parameters there meant as a way to avoid Storage_Error? -- Bj�rn Persson PGP key A88682FD omb jor ers @sv ge. r o.b n.p son eri nu