clearing screen 
Author Message
 clearing screen

   Whoever can help:

   I'm attempting to write a version of the program "Life" for a practice
assignment. I've got the engine working fine, but I'm havving problems
outputting the results clearly at the good speed. Right now I'm printing
out the matrix after any input, I'm thinking it would be perhaps easier to
clear the screen after every output and reprint form scratch, but I can't
find a way to do this in any of my C++ manuals.

   I'm programming in strict ANSI C++ on a Power Mac 7100, 8 megs Ram,
running Metrowerks 6.0. Any helps would be greatly appreciated.

                                                            -Chris Jones



Thu, 19 Mar 1998 03:00:00 GMT  
 clearing screen

Quote:
Jones) writes:
>    I'm programming in strict ANSI C++ on a Power Mac 7100, 8 megs Ram,
> running Metrowerks 6.0. Any helps would be greatly appreciated.

>                                                             -Chris Jones

That's easy, in ANSI C there is no way to clear the screen portably. I don't
know if C++ has added that to the specification (I doubt it), but there are just
too many things out there. Teletypes, printers, and files can't clear. VT100
clear differently from a DOS based program which clears differently from a
XWindows program which clears differently from a MacOS program which ...

Hank



Fri, 20 Mar 1998 03:00:00 GMT  
 clearing screen

Quote:

>   I'm attempting to write a version of the program "Life" for a practice
>assignment. I've got the engine working fine, but I'm havving problems
>outputting the results clearly at the good speed. Right now I'm printing
>out the matrix after any input, I'm thinking it would be perhaps easier to
>clear the screen after every output and reprint form scratch, but I can't
>find a way to do this in any of my C++ manuals.
>   I'm programming in strict ANSI C++ on a Power Mac 7100, 8 megs Ram,
>running Metrowerks 6.0. Any helps would be greatly appreciated.

How did this ever get through the moderators!

Point 1:  This problem is not appropriate for the newsgroup you have
posted it to, as it is a system-specific problem. The proper groups
would have been one of the Macintosh programming forums. This issue
is addressed in more detail in the FAQ.

[Actually, questions about how to decide what to reprint might be
 marginally on-topic.  How to do the clear is not, of course. -mod]

Point 2: There is _NO_ ANSI C++ standard yet. All that exists is a
Working Paper which is a notch below a Draft Standard.

Point 3: Segment the window into blocks. Each position in the matrix
has a glyph assigned to it, wether it is occupied or not. Since the
programmer controls the positioning of glyphs, you can output only
the glyphs that change, as they change.  You would then only have
to clear the window once at the beginning, and whenever expose events
occur.

Best regards,
Derick.
--
+------------------------------------------------------------------------+
| Derick R. Qua-Gonzalez                                      | ________ |
| Department of Physics, California State University          | \      / |

|     ``It is better to be hated for what one is,             |   \  /   |
|       than loved for what one is not.'' (A. Gide)           | 32 \/ USA|
+-------------------------------------------------------------+----------+



Sat, 21 Mar 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Init Screen w/o Clear Screen

2. Clearing screen before displaying menu

3. Clear Screen

4. ANSI clear screen

5. Help clearing screen

6. clear screen for Linux

7. Clear screen and cursor-position

8. Clear screen

9. Clear screen

10. clear screen for Linux

11. CLEAR SCREEN?

12. Clear Screen

 

 
Powered by phpBB® Forum Software