TIP: Click on subject to list as thread! ANSI
echo: cis.languages
to: PHIL SCHERER 71211,2545 (X)
from: Scott t. Griepentrog 72427,335
date: 1991-08-13 01:48:41
subject: #11734-#inkey

#: 11755 S3/Languages
    13-Aug-91  01:48:41
Sb: #11734-#inkey
Fm: Scott t. Griepentrog 72427,335
To: PHIL SCHERER 71211,2545 (X)

Yup, It won't.  There is two fixes: 1) put a \n on the first string. If you
don't want to do that, 2) do a fflush(stdout); before the inkey. Actually,
there's four. 3) use writeln() or write() instead (I highly suggest this -
check out the difference in code size if you don't use any printf's!!) 4)
there's a way to tell printf to use read/write calls intead of readln/writeln. 
I think it's doc'd somewhere under fopen (?).

Personally, I do everything with read/write/readln/writeln.  Everything. Even
code I write on PC's - I have written a readln/writeln function for use there. 
The bottom line is - you're going direct to the system i/o. But the
disadvantage is you have to put everything together into one string (or make
multiple calls) and you don't have %d and %x.  But then, I've written routines
to do conversion to decimal and hex for printing too. It all depends on how
much of what you are going to do.  I hate mixing reads/writes and printf's, and
I prefer not to use printf's at all if I can help it, but sometimes there's no
better way.

StG

There is 1 Reply.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.