From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,fe013e8e74cb49c5,start X-Google-Attributes: gid1164f8,public X-Google-Thread: 1153e1,fe013e8e74cb49c5,start X-Google-Attributes: gid1153e1,public X-Google-ArrivalTime: 1987-02-27 13:35:43 PST Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!cbatt!osu-eddie!bgsuvax!denbeste From: denbeste@bgsuvax.UUCP Newsgroups: comp.sources.wanted,comp.sys.dec Subject: VMS Pascal Terminal I/O help needed Message-ID: <701@bgsuvax.UUCP> Date: Fri, 27-Feb-87 16:35:43 EST Article-I.D.: bgsuvax.701 Posted: Fri Feb 27 16:35:43 1987 Date-Received: Sun, 1-Mar-87 11:47:57 EST Organization: Bowling Green State University B.G., Oh. Xref: utgpu comp.sources.wanted:660 comp.sys.dec:77 I am having difficulties writing what should be a simple program. I want to read in a character at a time from the keyboard and print out the next higher character. I also want a prompt to be displayed. My initial expectation was to write the program as follows PROGRAM NextChar(Input,Output); VAR ch : Char; BEGIN WriteLn('Press RETURN to Exit'); Write('prompt>'); REPEAT Read(CH); Write(chr(ord(ch)+1)); UNTIL ch = chr(13); WriteLn(' Thank You.'); END. My problem with this is that Read doesn't pass on the char until return has been pressed on the keyboard. One sugestion was to use the SMG$ routines and create a virtual keyboard. This worked, except that it created another problem. None of my output, including the prompt, was echoed until the WriteLn was encountered. (It is also a royal pain for such a simple task.) Please excuse any typos in the example, as I had to retype it in on our UNIX vax for posting. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Wiliam C. DenBesten | ... !osu-eddie!bgsuvax!denbeste UUCP Dept of Computer Science | denbeste%research1.bgsu.edu@csnet-relay ARPA Bowling Green State University | denbeste@research1.bgsu.edu CSNET Bowling Green, OH 43403-0214 | #include --------------------------------+---------------------------------------------- There is no difference between theory and practice in theory, but there is often a great deal of difference between theory and practice in practice.