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