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 14:20:38 GMT From: enterpoop.mit.edu!spool.mu.edu!howland.reston.ans.net!bogus.sura.net!jhun ix.hcf.jhu.edu!aplcen.apl.jhu.edu!ddsdx2.jhuapl.edu!dlc@ucbvax.Berkeley.EDU (D ave Collard x7468) Subject: Re: simple help with Text_IO Message-ID: <1993Feb3.142038.27379@aplcen.apl.jhu.edu> List-Id: In ccalbrec@laplace.uwaterloo.ca (Cory C. Albrecht) writes: >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 > New_Line; > Put("*:: "); > Put(instr); > Exit When instr="quit"; >End Loop; >End; --main It doesn't stall, you just haven't finished entering the string yet! Try keep entering characters until you have entered 255 characters. That is what get does -- What you want is Get_Line last : natural; begin loop new_line; put("*>> "); get_line(instr, last); new_line; Put("*:: "); Put(instr(1..last); etc. --Thor collard@capsrv.jhuapl.edu dlc@ddsdx2.jhuapl.edu