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 #52607 is a reply to message #52581] Mon, 28 October 2019 11:24 Go to previous messageGo to previous message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
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";
	}
}
 
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: Fri Apr 26 04:25:14 CEST 2024

Total time taken to generate the page: 0.04858 seconds