I hope this output will be for the same I thought that characters will be sent directly in the same way as the built-in output device (in your case the terminal emulator). This is dependent on the implementation of the terminal, so these characters are actually displayed. For example, a bell ( \ b and
\ r rarely used in practice I just got to know that I misunderstood these two escape sequences. A simple test:
printf ("foo \ bbar \ n");
FOP , because
\ b will return a backspace to the cursor, and
b < / Code> overwrites the second
o , but instead it outputs:
foobar
\ r With:
printf ("foo \ rbar \ n");
\ r will move the cursor at the beginning of the current line, so
bar to
foo , so the final output should be
bar . However, it actually outputs:
foo bar
\ a ) can trigger a beep on some terminals, flashs on each other on the screen or it will be completely ignored. It all depends on how the terminal is configured.
No comments:
Post a Comment