Found this article and thought of this thread. http://www.drdobbs.com/architecture-and-design/232900836?cid=DDJ_nl_mdev_2012-04-24_h&elq=d53b813fc9704062bbe2f4d6d6921a9e
> -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Black, Michael (IS) > Sent: Friday, April 20, 2012 6:43 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with > entityframework > > I should have said everybody (and I meant the languages and silicon) is > effectively checking "!= 0" for true. > > And the !!condition is a mathematical theorem of why -1 is not a good > value to use for "true"....not that you see that very often (if at > all). What you do see is "if (!condition == true)" which will fail > when true is -1 and condition is false. > > > > > > Michael D. Black > > Senior Scientist > > Advanced Analytics Directorate > > Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > ________________________________ > From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] > on behalf of Nico Williams [n...@cryptonector.com] > Sent: Thursday, April 19, 2012 4:47 PM > To: General Discussion of SQLite Database > Subject: EXT :Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with > entityframework > > On Thu, Apr 19, 2012 at 3:51 PM, Black, Michael (IS) > <michael.bla...@ngc.com> wrote: > > You are correct that non-zero will be treated as true. > > > > That's more an accident then anything else as everybody is checking > "!= 0" for true. > > No, C treats any non-zero value as true, as in "if (condition) ..." -- > that condition will considered true if it's non-zero. > > If you ever see "!!condition", that's just to normalize true values. > > Nico > -- > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users