Console operations

Dawid Ciężarkiewicz dawid.ciezarkiewicz at asn.pl
Tue Jan 30 16:01:24 PST 2007


orgoton at mindless.com wrote:

> How do I clear the console without have to use
> 
> version (Windows) system("cls");
> version (linux) system("clear");
> 
> Also how do I change BG/FG output color?
> 
> Thanks in advance.

Portably? Use escape sequences for terminal or ncurses. Or just learn
non-canonical mode of unix terminal.

Terminals were invented long time ago to print lines and read lines without
any formating like colors. If you do anything beyond simple reading and
writing, you are dealing with quite complicated things. IMO, best for you
will be using ncurses.


More information about the Digitalmars-d-learn mailing list