lot of work has been done, but lists are currently broken
[svn/Cll1h/.git] / demos / arguments1.c
CommitLineData
30628092 1#include "cll1.h"
2
420bb771 3//try to run: ./arguments1 -x xxx yyyy -c cccc
30628092 4
5program
6{
420bb771 7 Define_str(ptr);
30628092 8
420bb771 9 if_args then
30628092 10 {
420bb771 11 for_args
30628092 12 {
420bb771 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_one;
21 }
22 print("");
23 }
24 else
25 print("Standalone argument: ",ptr);
30628092 26 }
30628092 27 }
28 else
420bb771 29 print("Bleeeeh, no arguments supplied... :-(");
30628092 30}
This page took 0.144662 seconds and 4 git commands to generate.