Boolean conditions in Jade
Posted: Mon Apr 14, 2014 4:04 pm
Just a simple one, just curious why the following logic occurs this way
If a null string typecast to a date or timestamp is equal to null why is it a time type is not while all are primaries?
Secondly why does the string "false" equal to null while it is not a null string?
Curious as to what is the reasoning behind this as it seems different compared to other programming languages and a bit misleading.
Code: Select all
write "" = null; //true
write "".Date = null; //true
write "".TimeStamp = null; //true
write "".Time = null; //false???
write "false".Boolean = null; //true??
write "true".Boolean = null; //false
Code: Select all
write "".Time = null;
Code: Select all
"false".Boolean = null;
Curious as to what is the reasoning behind this as it seems different compared to other programming languages and a bit misleading.