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,eb2e0c5efa8c83d2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-18 07:19:06 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.gv.tsc.tdk.com!falcon.america.net!eagle.america.net.POSTED!not-for-mail Message-ID: <3C960618.1C06E64F@otelco.net> From: Larry Hazel X-Mailer: Mozilla 4.78 [en] (Win98; U) X-Accept-Language: en,x-ns11F8K63r3NhQ,x-ns2r2e09OnmPe2 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A very strange problem indeed... References: <3c95f466$0$6552@motown.iinet.net.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 18 Mar 2002 09:22:00 -0600 NNTP-Posting-Host: 66.0.32.230 X-Trace: eagle.america.net 1016464741 66.0.32.230 (Mon, 18 Mar 2002 10:19:01 EST) NNTP-Posting-Date: Mon, 18 Mar 2002 10:19:01 EST Organization: 24hoursupport.com Xref: archiver1.google.com comp.lang.ada:21407 Date: 2002-03-18T09:22:00-06:00 List-Id: Karl-Johan Karlsson wrote: > > Note that the following code details below are to do with the same > program mentioned in the "if statement" thread involving a problem > Steve Doiel helped me with (thanks a lot Steve!). > > The problem this time is that the string for the name entry is not > working properly! If I have Name : String(1..20) it will only > accept 20 characters and nothing less. If I delete four lines > of the code (found below to do with size and amount) then the > string accepts any amount of characters 20 or less in amount. > > Name : String(1..20); > Name_Count : Natural; > > I have cut the program up into little tiny bits and I've discovered > that the following four lines of code which preceed the Name code > is why my Name string isn't working: > > Put("size you want: "); > Item_Type_IO.Get(Choice); > Put("amount you want: "); > Get(Item_Amount); > > (These four lines do exactly what is required of them except that they > seem to be effecting the Name code...) > > These four lines above are the ones which are making my name string accept > only a certain amount of characters (e.g. 20), so if I type less characters > it will not go to the next part of the program. > > Put("Please tell us"); > New_Line; > Put("your name: "); > Get_Line(Name, Name_Count); > > The Name code above works only when I delete the size and amount code. > So the four lines to do with the size and amount code are the problem, > yet I cannot for the life of me understand why. Please, any assistance > would be greatly appreciated! > > (Note that I need the name code to be just above the amount and item code!) > Not sure I understand the problem, but if the code is in the order above, you need a Skip_Line call after the Get(Item_Amount), since the Get will not consume an end_of_line. Larry