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 » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Dumb bug. Improper use of Null
Re: Improper use of Null [message #52613 is a reply to message #52333] Wed, 30 October 2019 08:11 Go to previous message
koldo is currently offline  koldo
Messages: 3357
Registered: August 2008
Senior Veteran
"A ship in the beach is a lighthouse to the sea" Smile

Other scenario to watch out for:
MyFunction(double val) {
	if (IsNull(val))
		Cout() << "Null";
	else
		Cout() << "Not Null";
}
...
MyFunction(Null);		// "Null"
MyFunction(false ? 1 : Null);	// "Not Null". The call sets INT_NULL instead of DOUBLE_NULL


Best regards
IƱaki

[Updated on: Wed, 30 October 2019 08:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Nested template question
Next Topic: FP exception vs NaN
Goto Forum:
  


Current Time: Wed Apr 24 09:39:17 CEST 2024

Total time taken to generate the page: 0.03563 seconds