Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » cout and console control characters (FYI 2019-12 )
cout and console control characters [message #1820963] Mon, 03 February 2020 10:17 Go to next message
Eclipse UserFriend
The attached C++ code produces UNEXPECTED results - using standard local GCC Linux
1. Extra line added after each <<end;
2.The ASCII control characters are ignored
Preferences -> Debug -> Console
"interpret ASCII control characters " IS SET

The above all works as expected using cross-complied Linux "arm-..."


	cout << " START test area go " << __LINE__<< endl;
	cout << __FUNCTION__ << endl;
	cout << " START test area " << __LINE__ << endl;
	cout << __FUNCTION__ << endl;
	cout << " START test area " << __LINE__ << endl;
	cout << __FUNCTION__ << endl;
	cout << "\033[1;31mbold red text\033[0m\n";
	cout << "\033[1;32mbold green text\033[0m\n";




 START test area go 16main

 START test area 19

main

 START test area 21

main
bold red text
bold green text

Re: cout and console control characters [message #1820978 is a reply to message #1820963] Mon, 03 February 2020 13:26 Go to previous message
Eclipse UserFriend
from the help for 2019-12

Quote:

Interpret ASCII control characters
This preference will enable interpretation of some ASCII control characters in console. So far console can interpret backspace (\b) and carriage return (\r) if enabled. (see next preference for additional option on carriage return)

Note that it says ASCII and not ANSI
There is a difference.

Even if it were ANSI , the control set depends on the type of terminal being emulated.

The controls you tried to use are more appropriate for VT100 emulation.
The out-of-the box Eclipse console does not support ANSI emulation.


[Updated on: Mon, 03 February 2020 13:31] by Moderator

Previous Topic:Code Folding Problems
Next Topic:code with eclipse
Goto Forum:
  


Current Time: Sat Jun 14 23:41:37 EDT 2025

Powered by FUDForum. Page generated in 0.05464 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top