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 » Community » Newbie corner » Assert failed in core/value.h line 464
Re: Assert failed in core/value.h line 464 [message #28281 is a reply to message #28243] Wed, 25 August 2010 16:49 Go to previous messageGo to previous message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

Ok, I found it Cool

The Settings.Vexciter.Range parameter is of Value type.

The control that was being used to take in user input was of type EditString.

This was the assignment
Settings.Vexciter.Range = ~esExciterVoltage;
This is where things were going wrong. The String value was geting assigned to the variable.

Following this was a call to StoreToFile(Settings, cfgfile);
this was storing the value as a string in the cfgfile.

On reloading the file by using LoadFromFile(Settings, cfgfile), the string was being loaded to Value. On assigning this to Meter.SetMax(Settings.Vexciter.Range), I was getting the assertion since the Value does not seamlessly convert to a double(help file says so).

Doing this Meter.SetMax((double)Settings.Vexciter.Range) does not help either.

However, now, I am out of the block and hopefully can steam ahead. I have changed all the user input boxes to EditDouble type.

BTW: why does this work
	double d = Settings.ExciterVoltage.Range;
	Vexciter.meter.SetStep(d/4);

and why not this?
	Vexciter.meter.SetStep(Settings.ExciterVoltage.Range/4);

this gives an ambiguous operator message and fails to compile


Thanks for your help

[Updated on: Wed, 25 August 2010 16:54]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Algorithms and Vectors
Next Topic: Passing Vectors as arguments of functions.
Goto Forum:
  


Current Time: Wed May 15 22:42:25 CEST 2024

Total time taken to generate the page: 0.02492 seconds