Debian Codegraph @

examples/basic/args.ck

raw
1 // shows getting command line arguments
2 // (example run: chuck args:1:2:foo)
3
4 // print number of args
5 <<< "number of arguments:", me.args() >>>;
6
7 // print each
8 for( int i; i < me.args(); i++ )
9 {
10 <<< " ", me.arg(i) >>>;
11 }