Commit | Line | Data |
---|---|---|
1 | #include "cll1.h" | |
2 | ||
3 | /* try to run: ./arguments1 -x xxx yyyy -c cccc */ | |
4 | ||
5 | program | |
6 | { | |
7 | if_args | |
8 | { | |
9 | for_args | |
10 | { | |
11 | if this_arg[0] == '-') | |
12 | { | |
13 | printf("Command line switch: -%c ",ptr[1]); | |
14 | if (next_arg) then | |
15 | { | |
16 | echo("followed by: ",next_arg); | |
17 | skip_next; | |
18 | } | |
19 | print(""); | |
20 | } | |
21 | else | |
22 | print("Standalone argument: ",ptr); | |
23 | } | |
24 | } | |
25 | else | |
26 | print("Bleeeeh, no arguments supplied... :-("); | |
27 | } |