The console is a
system dependant device, meaning it is manipulated differently for every system + hardware configuration you have got. One of the things that made the PC so popular was that hardware was required to conform to specific operational standards -- and hence avoid a lot of the grief that came with manipulating the standard devices. Despite that, though, the devices remain one of many, and doing something like clearing the screen or flushing input remains a system dependant operation.
One of the foundations of the Unix design was the concept of "streams". Something we take for granted, like having the standard I/O streams
automatically connected to a character device -- possibly redirected -- when the program starts, was a revolutionary concept. It provided, beyond an end to complicated job control scripts to start a program, a great deal of flexibility and power in the design of programs -- stuff we take for granted today with programs like
cat,
sed and
grep.
Of course, sometimes the program's design wants a human to be present to be useful, like a text editor or a video game. Since different devices and systems remain, happily,
different, extra expertise is required to do fancy things with them -- like clearing the screen. The
termcap and later
terminfo databases were designed for the very purpose of standardizing access to the myriad of TTY devices available so that the programmer can write device-independant code to manipulate them. Using it is actually rather convenient and introspectable.
sargon94 wrote: |
---|
Also, just because a "large part" thinks something doesn't mean they're right. |
And just because you believe your brain to be bigger and faster than computer professionals and industry leaders many times older and more experienced than you does not make you right.
Your responses in this thread mark you as a CS loser:
- you suggest the use of a dangerous function
- you fail to read direct links
given to you which thoroughly prove the danger of said function
- you ridicule those who remonstrated with your failure to read and understand
- you call us "Nazis" (somehow you missed
http://en.wikipedia.org/wiki/Godwin%27s_law )
- you libel another's comprehension by crudly suggesting he can't read
- you belittle others because their views conflict with your (uninformed) view
You won't get far so long as you stick with your script kiddie wannabe crap. How about taking a little time to actually learn something useful and make yourself a friend to others, rather than lead them to do stupid things and huff and puff when you make a mistake?
Don't be a loser.