delorie.com/archives/browse.cgi | search |
From: | vsurlan AT alf DOT tel DOT hr (Vlatko Surlan) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Why? |
Date: | 15 Sep 1997 12:14:45 GMT |
Organization: | Croatian Post & Telecommunications |
Lines: | 15 |
Distribution: | world |
Message-ID: | <5vj8rl$b45@argos.tel.hr> |
References: | <EGH6KJ DOT 4G2 AT freenet DOT victoria DOT bc DOT ca> |
NNTP-Posting-Host: | alf.tel.hr |
Mime-Version: | 1.0 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
It does NOT do getch() before printf(). It's just that the text you sent to screen remain in bufer till something kick his ass out. Usually it's new line of text or function fflush( stdio ). You can allso set bufer to zero and there will be no bufering at all ( some function setvbuf() or something like that ). Or :)) U can use functions that aren't bufered. Puff! The "Hello world!" that U wanted : main () { printf ( "\n At your service master" ); fflush( stdio ); // kick the sucker out on the field. Yeah!! getch() // Now will the slave wait for next command }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |