TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Bill Birrell
from: Kenneth Dunn
date: 1998-08-02 23:21:02
subject: How do i learn `c`

Bill Birrell,
  In a message on 1 August, to Patrick Dempster, wrote :

BB>     For example, the command line "find / *.doc -print",
would have "find
BB> argv[0], "/path/find" as argv[1], "/" as
argv[2], "*.doc" as argv[3], "-p
BB> as argv[4], and NULL as argv[5]. That would make argc 4.

"*.doc" may be treated as a regular expression by the shell
and expanded to matching names. MS-DOS command.com doesn't 
do wildcard expansion, but other shells do. 

argv[1] being the path sounds like an some sort of MS-ism. But 
assuming that a particular compiler did that, argv[4] makes 
argc = 5.

BB> list. Incrementing the pointer, (++argv) makes it point to the second str
BB> and so on, so it is really a convenient way to reference the command line
BB> arguments one at a time.

Not if you want to re-evaluate the arguement list again without
doing pointer subtraction or making a copy of pointer to the array 
of strings :-) 
  
...
               
--- Renegade v10-05 Exp
* Origin: The Hairless Girls' BBS Mt Eden Auckland NZ (3:772/500)
SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728
SEEN-BY: 639/252 670/213 218
@PATH: 772/500 1 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.