delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/01/07/19:51:55

Sender: nate AT cartsys DOT com
Message-ID: <369554C2.357E317E@cartsys.com>
Date: Thu, 07 Jan 1999 16:43:46 -0800
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.0.36 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Newbie, stupid 'printf' Question
References: <19990107175907 DOT 21430 DOT 00007885 AT ng-fp1 DOT aol DOT com>
Reply-To: djgpp AT delorie DOT com

MstrX1 wrote:
> 
> Hello,
> if I don't type a LF("\n") at the end of my printf-text
> the text isn't printed correctly under MS-DOS.
> Most times this isn't a problem, because I need
> it anyway, but if I want to print text at the bottom
> of the screen and I print (printf("Hello World\n")),
> the screen scrolls down and the top-line will be destroyed.
> 
> How can I print it correctly without using a "\n" at the end,
> or stop this scrolling ?

In general, if you want to position text on the screen, you should use
the conio family of functions.  See `gotoxy' and `cprintf' in the docs.
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019