from the following question I begin to know the meaning of \f in c++: Escape sequence \f - form feed - what exactly is it? but why c++ have this formfeed character? is there any c++ program that runs on a typewriter?
Asked
Active
Viewed 218 times
2 Answers
5
The formfeed character is not only for typewriters, it's universally recognized by all printers (or printer drivers) to stop the current page and advance to the next.

Some programmer dude
- 400,186
- 35
- 402
- 621
-
5+1 Not just printers either... some terminal protocols may use form feed too - e.g. as a way to clear the screen. – Tony Delroy Jun 28 '13 at 05:50
-
... precisely because it's been a part of the C standard since forever. – kfsone Jun 28 '13 at 06:02
-
-
@CyberRusher: Example of what? The answer and a comment both contain examples of devices that take behavior from form feed. – GManNickG Jun 28 '13 at 06:25
-
1
There is a number of characters that can be expressed with notation like \t
, \b
, etc. There is nothing magic in this list. This is just a simple way to insert characters with values less than space (0x20) into the string. The list of these characters has primarily historical base. These chars are used in old programs. Why should they stop compiling? The negative impact from this feature is minimal to none.
The language itself does not put any meaning into these chars. They are simply placed into a string or char constant. The program deals with them.

Kirill Kobelev
- 10,252
- 6
- 30
- 51