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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8dd8ee71ca4e5206 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-10-04 10:49:26 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!cyclone1.gnilink.net!spamfinder.gnilink.net!nwrddc02.gnilink.net.POSTED!53ab2750!not-for-mail From: "Justin Birtwell" Newsgroups: comp.lang.ada References: <93d4dcd4.0210031020.b0cca2b@posting.google.com> Subject: Re: Newbie question on Ada TExt_IO X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Fri, 04 Oct 2002 17:49:26 GMT NNTP-Posting-Host: 151.202.46.147 X-Complaints-To: abuse@verizon.net X-Trace: nwrddc02.gnilink.net 1033753766 151.202.46.147 (Fri, 04 Oct 2002 13:49:26 EDT) NNTP-Posting-Date: Fri, 04 Oct 2002 13:49:26 EDT Xref: archiver1.google.com comp.lang.ada:29516 Date: 2002-10-04T17:49:26+00:00 List-Id: Steve, <<, I would read the value into a string using something like Text_Io.Read_Line with the string ridiculously large (maybe 1..256). >> I couldn't find the package Text_IO.Read_Line did you mean Get_Line? What 's the difference between having a huge array like String(1..256) and using an Unbounded_String? Is it because we need the type to be specifically String and not Unbounded_String? Couldn't we convert from one to the other? << If after reading the string the value of "last" is the size of the string, I know something is wrong and report an error (unlikely to happen, but handled). Once I get a reasonably sized string, I trim leading and trailing spaces using Ada.Fixed.Trim. >> How do you evaluate the length of the string using "Input'Last" isn't always going to be 256, it was for me? <> The Index function has a pattern matching parameter, how do you express "all digits" without having to specify them individually? Thanks for your help, Justin