X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=demos%2Farguments1.c;h=552e983b69d7f084926917b1afd7f7f9c803392a;hb=eb0d8f8c793b40623f60e51c055f8a7cb7cae668;hp=a892c3a24eddfadb7269c44550f448315c814ba0;hpb=420bb7716ee099d369582836ef4fc8ab25d81fde;p=svn%2FCll1h%2F.git diff --git a/demos/arguments1.c b/demos/arguments1.c index a892c3a..552e983 100644 --- a/demos/arguments1.c +++ b/demos/arguments1.c @@ -1,23 +1,20 @@ #include "cll1.h" -//try to run: ./arguments1 -x xxx yyyy -c cccc +/* try to run: ./arguments1 -x xxx yyyy -c cccc */ program { - Define_str(ptr); - - if_args then + if_args { for_args { - ptr=this_arg; - if (ptr[0]=='-') then + if this_arg[0] == '-') { printf("Command line switch: -%c ",ptr[1]); if (next_arg) then { echo("followed by: ",next_arg); - skip_one; + skip_next; } print(""); }