Re: [CODE] confused on:

From: George Greer (greerga@circlemud.org)
Date: 01/26/02


On Sat, 26 Jan 2002, Russell Ryan wrote:

>argv[] and argc are not commands, they are variables passed to a program's
>(any program, not just circlemud) main() routine by the operating system's
>shell. argc is the number of command line arguments typed, and argv[] is an
>array holding all the arguments.
>So
>argv[0] would address the first command line argument, (if any).

argv[1] is the first argument. argv[0] is the name of your program, as
invoked. Perl has $ARGV[0] as the first argument and $0 as the program
name.

--
George Greer
greerga@circlemud.org

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT