delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/19/23:18:47

To: djgpp AT delorie DOT com
Date: Mon, 19 Jan 1998 10:19:13 -0500
Subject: Re: char getch (void)
Message-ID: <19980119.101914.3798.3.matthew.krause@juno.com>
From: matthew DOT krause AT juno DOT com (Matthew R Krause)

Bjoern Appel wrote:
> Now it seems that  cprintf() interprets a "\n" as a newline and
> nothing more. The printf()-funktion interprets it as a newline and
> carrige return. The above program produces staircases when I run it
> under DOS. Is there any trick like a escape-sequence for carrige
> return (This time I looked in the FAQ first; nothing found ;-) ? 
Yes /r (for return maybe?) so if you want to print a list with 'cprintf'
that goes straight down the side, you need something like:

#include <conio.h>
int main /*Just to be follow ansi  :>)*/
{
/*Your code here*/
cprintf("foo\r\n")
exit(0)
}

- Raw text -


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