www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/04/18/13:12:29

From: "Al Amzeen (Alexandr Amzin)" <amzeen AT mtu-net DOT ru>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How could I clear screen in C++???
Date: Tue, 18 Apr 2000 20:46:00 +0400
Organization: Fidolook Express page http://fidolook.da.ru
Lines: 44
Message-ID: <8di55j$qvt$1@gavrilo.mtu.ru>
References: <eQP3QX9p$GA DOT 274 AT net025s> <a04310101b51fd999f90c@[158.142.75.53]> <#ncDhZDq$GA DOT 261 AT net003s> <8desjg$iai$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <OeGJIhIq$GA DOT 202 AT net025s> <uMZlCQVq$GA DOT 300 AT net003s>
NNTP-Posting-Host: ppp104-134.dialup.mtu-net.ru
X-Trace: gavrilo.mtu.ru 956078068 27645 212.188.104.134 (18 Apr 2000 17:14:28 GMT)
X-Complaints-To: usenet-abuse AT mtu DOT ru
NNTP-Posting-Date: 18 Apr 2000 17:14:28 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Fidolook Express V1.51rus for MS OE 5.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

==
oneliner:Hali-gali, paratrooper...(c)
Greetings, Hackrus <hackrus AT hotmail DOT com>! You wrote:
> I have found a way of doing this. If you put:
> int i;
> for (i=0;i<50;i++)
> cout << "\n" << endl;
> on the top of the text where the screen should be deleted, en put this:
> int i;
> for (i=0;i<??;i++)
> cout << "\n" << endl;
> on the bottom of the text, then you should fill in 24-the rows of text=??
There some modes that can count as _text_ modes. some modes are 50 strings.
Then we'll clear any screen in 50 strings. Use 25 (not 24) for plain txt
mode, of course. :)

> So if you have 4 rows of text on the screen, do this:
> int i;
> for (i=0;i<20;i++)
> cout << "\n" << endl;
> this would let you scroll down, so the text is at the top of the screen.
> I now it's not a good way of clearing the screen, but it's possible in
this
> way!!
> (Sorry for my bad english!!).
Well, old batches were using it :).
Hmmm...'for' is a heavy and harsh contruction. Catch that:
cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" << endl;

For 25 row mode ;).

> Hope you guys now a better way for doing this!!
There are the ways:

-cout
-peeking-poking to the videomemory
-clrscr() (it works!!!!)
-clear(screen) in Allegro

and more :).

ps. I call it "be creative" ;).


- Raw text -


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