I was under the impression that, in C, 0 was false, non-zero was true.
> -----Original Message----- > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- > boun...@sqlite.org] On Behalf Of Black, Michael (IS) > Sent: Thursday, April 19, 2012 3:15 PM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] "DEFAULT BOOLEAN NOT NULL" not working with > entityframework > > Problem with true=-1..... > > > > !false=1 > > > > So !false == true fails which can bite you in the behind > unexpectedly.... > > > > true= 1 > !true=0 > true=-1 > !true=0 > !false=1 > (true= 1 == !false) = 1 > (true=-1 == !false) = 0 > > > > #include <stdio.h> > main() > { > int true1=1; > int true2=-1; > int false=0; > printf("true= 1\n!true=%d\n",!true1); > printf("true=-1\n!true=%d\n",!true2); > printf("!false=%d\n",!false); > printf("(true= 1 == !false) = %d\n",true1==!false); > printf("(true=-1 == !false) = %d\n",true2==!false); } > > > > > > Michael D. Black > > Senior Scientist > > Advanced Analytics Directorate > > Advanced GEOINT Solutions Operating Unit > > Northrop Grumman Information Systems > > ________________________________ > >>That is interesting to know, I tend to use -1 as true (misspent youth > >>dabbling in Forth on 8 bit machines). > > _______________________________________________ > 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