From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 3 Feb 93 16:41:41 GMT From: ucivax!gateway@ucbvax.Berkeley.EDU (Kenneth Anderson) Subject: Re: simple help with Text_IO Message-ID: <9302030841.aa14207@Paris.ics.uci.edu> List-Id: In comp.lang.ada you write: >Could somebody tell me (email please) why this programme, >which compiles properly, seemingly stalls at the >line indicated? i.e. I type in a line followed by , >but nothing happens. What should happen is that this: >*:: >should be printed to the console, but isn't. And nothing >happens. The input prompt: >*>> >is printed, then I can type something, but after >nothing happens. :( >With Text_IO; Use Text_IO; >Procedure main is >instr, tokstr : String(1..255); >Begin >Loop > New_Line; > Put("*>> "); > Get(instr); -- this is where it stalls and won't go furthe r It stalls here, because Get is trying to fill the string that you gave it. I.E. try typing a string that is 255 characters long! I belive the way to get around this, is to use the function Get_Line. > New_Line; > Put("*:: "); > Put(instr); > Exit When instr="quit"; >End Loop; >End; --main Ken