>While you are correct that the action is "nonsensical" based on the
>definition of the API, surely you can concede that in an environment (C
>programming) where "argv" is an intrinsic part of every program thanks to
>that name's standard use as a parameter to main

But that is because you (meaning the person who wrote the main function) have 
declared the symbolic names for the arguments to the function "main" to be 
those names.  The names themselves are meaningless.  Are you suggesting that if 
you ran a global search and replace of the web and all printed materials that 
replaced:

int main(int argc, char *argv[]) -> int main(int urinals, char *urinalcake[])

that unrinals and urinalcake's would thereby get magic status, and that people 
would start calling "arguments to functions" "urinalcakes" instead of 
arguments?  Does that mean that every usage of the word "urinals" refers to the 
count of the argument strings to the function main?

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.

>, 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).




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

Reply via email to