4. System interface

We show how to get at the command line arguments. The function 'argv' returns an empty string if the argument index is out of range. argv 0 is usually the program name: for the flx_run driver its the loaded library name: the driver name and control arguments are stripped. (Note: the output is platform dependent and so can't be checked)
Start felix section to tut/examples/xtut_beg301.flx[1 /1 ]
     1: #line 3189 "./lpsrc/flx_tutorial.pak"
     2: #import <flx.flxh>
     3: open System;
     4: print "argc="; print argc; endl;
     5: 
     6: var i:int;
     7: for_each {i=0;} {i<argc} {++i;}
     8: {
     9:   print i; print "->"; print (argv i); endl;
    10: };
    11: 
End felix section to tut/examples/xtut_beg301.flx[1]