Profile

unixronin: Galen the technomage, from Babylon 5: Crusade (Default)
Unixronin

December 2012

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Expand Cut Tags

No cut tags
Monday, September 19th, 2005 02:53 pm

Pirate code, from [livejournal.com profile] midiamin:

main(int arrrrrrgc, char **arrrrrrgv)

 

Tags:
Monday, September 19th, 2005 04:35 pm (UTC)
Well of course it is, me bucko! Did ye think I take ye for a scurvy lubber?




Seriously ... the standard top-level function for a C program is called main(). It is expected to be called with two arguments: an integer telling the length of the second argument, followed by an argument vector of pointers to strings. By convention, these are called argc and argv; thus main() is typically declared as follows:

int main (int argc, char **argv)

However, as long as you're consistent about it, you could call those two variables whatever you like. You could call them ren and stimpy, so long as you always consistently referenced them by those names throughout main().

int main (int ren, char **stimpy)

So if you're feeling piratical and feel like inserting a few extra Rs, ti works just fine ... as long as you're consistent about it. :)
Monday, September 19th, 2005 09:12 pm (UTC)
kewl, i never got passed DOS 3.5 and GWBASIC when i was fiddlin with stuffs. i still hate windoze though!