Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » [solved] CParser GetColumn bugfix
Re: CParser GetColumn bugfix [message #52615 is a reply to message #52607] Wed, 30 October 2019 08:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
cbpporter wrote on Mon, 28 October 2019 11:24
It is indeed pos = 1.

It was 1 at one time then I tried to fix it in Spaces and that fix required 0, but it is easier and more reliable to fix in GetColumn.

This is the shortest real life example I could find:

CONSOLE_APP_MAIN {
	String s =
"+ /* \n"
"  */ a";

	CParser p(s);
	
	if (p.Char('+')) {
		Point z(p.GetLine(), p.GetPos().GetColumn());
		Cout() << z.x << ", " << z.y << ": " << p.ReadId() << "\n";
	}
}


Thank you. I believe I have that fixed 'correctly' (in Spaces0 etc...), in the trunk.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Long time running program and Vector
Next Topic: IsSpace() should be true on non breaking space
Goto Forum:
  


Current Time: Sat Apr 20 00:30:41 CEST 2024

Total time taken to generate the page: 0.02631 seconds