>> There is no magic associated with a symbol name in C -- it is simply
>> what you chose to call it.  Just because you chose to call something 
>>"argc" does not mean that it is a count of anything (much less a count 
>>of arguments), nor even that it is a default width integer; nor does 
>>calling something an argv make it an array of pointers to character 
>>strings.

>There is something "magic" about main in standard C / C++ hosted
>environments (because it is what the standard library wants to jump to
>after running the library startup code). I dare say most developers have
>not read the standards documents and thus don't know or understand the
>exact difference between "hosted" and "free standing" environments or why
>main is used "everywhere" except (practically) for Windows GUI apps which
>need a WinMain instead of main.

>> >, and where it is understood to be defined as "char**" or equivalent,
>> >one might be forgiven for not quite understanding the difference.

>> No THE PERSON TYPING THE CODE declared it as a char**.  (Of course, the
>> actual type of the argument strings passed to the main function of a C
>> program is char*[], not char**, so you are technically using an
>> incorrect declaration and have made an incorrect assumption about the 
>> meaning of argv anyway).

>Please carefully re-read my comment: 'defined as "char**" or equivalent'.
>"char** argv" is the same as "char* argv[]" in every way except for
>spelling.

but char** is not equivalent to sqlite_value** and a scalar function
definition has a type of void (*xFunc)(sqlite3_context*,int,sqlite3_value**)

void functionName(sqlite3_context* a, int b, sqlite3_value**c)

granted the main function is

int main(int a, char**b)

but spelling "c" as "argv" does not change the type to "char**".

>Anyway, sorry for opening such a can of worms. You'll note I haven't made
>these types of comments with regard to people asking questions that seem
>obviously to be for homework problems or for deep explanations of the
>innards of exactly how VDBE works. In this case I didn't think the
>question asked warranted the type of response I read. 
>No more or less. Take care.

You too.  However, I would point out that there is a big difference between a 
symbol name and the type declared for that symbol in its instantaneous 
declaration.  Using a name often used in a different context does not change 
the declared type in the declaration to the type of the symbol name you have 
subverted.




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to