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  |
 |
koldo
Messages: 3437 Registered: August 2008
|
Senior Veteran |
|
|
"A ship in the beach is a lighthouse to the sea" 
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
|
|
|
Goto Forum:
Current Time: Mon Jul 07 23:11:27 CEST 2025
Total time taken to generate the page: 0.02739 seconds
|