nic
[svn/Cll1h/.git] / demos / arguments1.c
CommitLineData
30628092 1#include "cll1.h"
2
b194148d 3/* try to run: ./arguments1 -x xxx yyyy -c cccc */
30628092 4
5program
6{
96df7894 7 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);
e91cd880 20 skip_next;
420bb771 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.157323 seconds and 4 git commands to generate.