Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 15:17 Go to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
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 18:26 Go to previous message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
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 18:31]

Report message to a moderator

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


Current Time: Fri Apr 26 11:13:25 GMT 2024

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

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

Back to the top