U++ framework
Do not panic. Ask here before giving up.

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: 14291
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: Mon Jun 01 22:16:48 GMT+2 2026

Total time taken to generate the page: 0.00609 seconds