Xref: news2.mv.net comp.os.msdos.djgpp:3272 From: fmarcos AT jet DOT es (Fernando Marcos) Newsgroups: comp.os.msdos.djgpp Subject: Re: Odd printf behaviour Date: Mon, 29 Apr 1996 13:28:50 GMT Organization: Servicio IBERNET (Telefonica Transmision de Datos) Lines: 14 Message-ID: <4m2fva$qo1@minerva.ibernet.es> References: <199604240928 DOT NAA08434 AT video DOT yars DOT free DOT net> NNTP-Posting-Host: info118.jet.es To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp "Alexander V. Lukyanov" wrote: >> I wrote some simple code that utilizes the gotoxy() and printf() >> statements to place text on the screen, ala: >> When I run this type of code nothing appears on the screen. I can see >> the cursor jumping around, but nothing else. However, if I include a >> '\n' in the printf statement, things display fine, *or* as soon as I >> printf with a '\n' outside the loop, then **all** the text gets >> displayed. It's almost as if it's being buffered, and isn't displayed >> until a '\n' comes along. That is because you need to fflush(stdout) after you write a string without a trailing "\n". It is a normal printf() "feature".