Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!bu.edu!bu-cs!dartvax!eleazar.dartmouth.edu!anarch From: anarch@eleazar.dartmouth.edu (The Anarch) Newsgroups: comp.sys.apple Subject: Re: Orca/Pascal Question Message-ID: <18499@dartvax.Dartmouth.EDU> Date: 14 Jan 90 06:20:56 GMT References: <9001131418.AA10902@apple.com> <421@unicorn.WWU.EDU> Sender: news@dartvax.Dartmouth.EDU Organization: Damage, Inc. Lines: 22 In article <421@unicorn.WWU.EDU> n8948315@unicorn.WWU.EDU (arthur morgan) writes: >In my experience with Pascal and Modula-2 (the son of pascal), I have found >the following to be true. Whenever you do a read operation, whether it be a >Read, ReadString, ReadInt, ReadReal, or whatever; the input all goes into an >input buffer, and a return charaacter is required in order to tell the com- >puter that the input operation is finished, and you are ready to have the >computer do whatever it is supposed to do with the data. For this reason, >when you do that 'Read(c);' with c being a variable of type CHAR, you MUST >enter a return character in order to terminate the input operation and send >the computer on to execute its next instruction. I hope this makes sense. :-) This is indeed the case, but it is possible to get character by character input in Pascal using the 'get' command. This command reads in the character in the file window and advances the file window one space. Since keyboard input is just a file to Pascal, like stdin to C, this command will read a single typed character. -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-anarch@dartmouth.edu+-+-+-+-+-+-+-+-+-+-+-+-+-+ Thy hand, great Anarch! lets the curtain fall, And universal darkness buries all. D I S C L A I M E R : E V E R Y T H I N G I W R I T E I S F A L S E