Commit | Line | Data |
---|---|---|
30628092 | 1 | #include "cll1.h" |
2 | ||
3 | //try$ make arguments2 | |
4 | //try$ ./arguments2 -f xxx yyyy -? | |
5 | ||
6 | program | |
7 | { | |
8 | char *ptr; | |
9 | ||
10 | arguments | |
11 | { | |
12 | argument("-?") printf("This is just help!\n"); | |
13 | else argument("-f") { nextargument(ptr) printf("Forced argument: %s\n",ptr); } | |
14 | else { thisargument(ptr); printf("Simple argument: %s \n",ptr); } | |
15 | } | |
16 | else | |
17 | puts("Bleeeeh, no arguments supplied... :-("); | |
18 | } |