deathadder
06-12-2007, 08:58 AM
Sitting around and doing some programming today I realised that I didn't know what argv stood for. I mean, I know what argv in a main is used for, how it works etc, but I had never questioned why it was argv and not anything else.
I mean argc is pretty simple to understand, argument count, argv however? Why not argl, argument list, or anything else. Which got me thinking, so I went off and found out why those two names had been made the "standard". I found this:
"argc" stands for "argument count". It is the number of elements in
"argv", "argument vector".
http://www.dgp.toronto.edu/~ajr/209/notes/argv.html
That makes sense to me, but it still doesn't actually explain why 'argv' is used over another choice. Computing seems to be based on acronyms at times, which is fair enough, acronyms mean something.
How much of programming / networking or computing in general is based around pseudo standards? I'm interested now in finding out as many "standards" as I can in computing.
So I thought I'd see how many people here find themself using the same conventions each day, without actually knowing why they're using it...unless ofcourse I'm alone in not knowing why argv is used ;)
I mean argc is pretty simple to understand, argument count, argv however? Why not argl, argument list, or anything else. Which got me thinking, so I went off and found out why those two names had been made the "standard". I found this:
"argc" stands for "argument count". It is the number of elements in
"argv", "argument vector".
http://www.dgp.toronto.edu/~ajr/209/notes/argv.html
That makes sense to me, but it still doesn't actually explain why 'argv' is used over another choice. Computing seems to be based on acronyms at times, which is fair enough, acronyms mean something.
How much of programming / networking or computing in general is based around pseudo standards? I'm interested now in finding out as many "standards" as I can in computing.
So I thought I'd see how many people here find themself using the same conventions each day, without actually knowing why they're using it...unless ofcourse I'm alone in not knowing why argv is used ;)