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,464e83ce40d49214,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-09 19:13:14 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: sidney_bhaiji@hotmail.com (Sidney Bhaiji) Newsgroups: comp.lang.ada Subject: Newbie question: input problem Date: 9 Apr 2002 19:13:13 -0700 Organization: http://groups.google.com/ Message-ID: <826d4d0f.0204091813.6039c1b0@posting.google.com> NNTP-Posting-Host: 67.213.127.4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1018404794 4799 127.0.0.1 (10 Apr 2002 02:13:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 10 Apr 2002 02:13:14 GMT Xref: archiver1.google.com comp.lang.ada:22291 Date: 2002-04-10T02:13:14+00:00 List-Id: Hi, I have the following problem... Consider the following lines of code.... Option: Integer; strName, strAddress: String(1..50); length_In, length_In2: Integer; Put_Line("Please enter an integer according to what you want to do"); Get(Option, 1);New_Line; if (Option = 3) then Put_Line("Please enter your name"); Get(strName, length_In); New_Line; Put_Line("Please enter your address"); Get(strAddress, length_In2); .... The problem is that after I put the integer in and push enter (in response to the first question) the next line is outputted (Please enter your name) but then before I could enter the name, the prompt for address is outputted, the get(strName..) is completely skipped. I have tried several things and can't get this to work. What am I doing wrong?? I'm thinking that the problem might be with the get option, such that it is grabbing too many characters, b/c when that line is commented out and i hardcord in the option number everything works as it should. The problem is not w/ the New_Line after the Get(strName...) I have tried playing around w/ this, its omission makes no difference. Example of output.... Please enter an option 3 Please enter your name --wrong! i did not get to input the name!!! Please enter your address