It would be nice to know what return-code is. One ought to be checking the return code and if-and-only-if the return code is SQLITE_OK was the prepare successful.
Without knowing the value of the return-code, examining the statement pointer is only worthwhile after determinine that the prepare was successful ... and looking at the returned statement pointer is not a substitute for checking the return code. if-and-only-if the return code is demonstrably SQLITE_OK AND the statement pointer is NULL/0 AND the statement is not a comment or other no-op, is there anything meaningful to be derived from the fact that the statement pointer is 0/NULL. Only by seeing all of the input SQL statement, the return code, and statement pointer value is it possible to even posit that there is anything wrong at all. --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-----Original Message----- >From: sqlite-users [mailto:sqlite-users- >boun...@mailinglists.sqlite.org] On Behalf Of Cory Nelson >Sent: Thursday, 31 August, 2017 22:42 >To: SQLite mailing list >Subject: Re: [sqlite] Yes, NULL is zero, is it? > >On Thu, Aug 31, 2017 at 11:01 PM, Simon Slavin <slav...@bigfraud.org> >wrote: >> >> >> On 1 Sep 2017, at 4:49am, J Decker <d3c...@gmail.com> wrote: >> >>> That and MinGW defines NULL as 0 if C++ and not void(*) >> >> Oh Gawd, the old C/C++ problem. >> >> Some compilers and IDEs, by default, compile ".c" files as if they >are C++. This leads to all sorts of weird behaviour including both >compiler error messages and programs which compile fine then >misbehave while running. NULL is one of the things C and C++ do >differently. >> >> I’m not saying this is the problem here, merely that it deserves a >mention. > >If you're in any slightly modern compiler, always use nullptr instead >of NULL. > >-- >Cory Nelson >http://int64.org >_______________________________________________ >sqlite-users mailing list >sqlite-users@mailinglists.sqlite.org >http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users