| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | getopt() |
1237c944674a c_echo Hello Jasen - CA>> Whitespace works too. JB> I meant by separate i meant to provide a way to JB> diferentiate between them CA>>>> With argc available I don't see the need for the switch CA>>>> chars. Order of entry should be sufficient. ac>>> touch t 030806 myfile ac>>> then you would need to always three arguments. Plus it's ac>>> not so obvious that argv[1] is a switch and that argv[2] ac>>> is the parameter to argv[2]. Someone unfamilar with the ac>>> touch utility may think that 030806 is a filename. CA>> I used "touch t030806 myfile" (no whitespace) and parsed CA>> from whitespace to whitespace. JB> what happens if you've got a file called d030707 etc... Good point. I guess I've been mainly writing utlities to pipe from stdin to stdout. JB> if you use swiutches it lets you reliably tackle more than JB> one file at a time in this scenario. True again. Dealing with multiple filenames would put me back where I started with bloated command line parsing code and at that point I may as well use getopt() or something similar with switch characters. :-) > > , , > o/ Charles.Angelich \o , > __o/ > / > USA, MI < \ __\__ --- * ATP/16bit 2.31 * ... DOS the Ghost in the Machine! http://www.undercoverdesign.com/dosghost/* Origin: Try Our Web Based QWK: DOCSPLACE.ORG (1:123/140) SEEN-BY: 633/267 270 @PATH: 123/140 500 106/2000 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™.