argv
argv( [x_int] ) =>g_result
Description
Returns the arguments passed to a SKILL script. Used to enhance the SKILL script environment. This function works only for scripting with SKILL standalone executable (skill).
Arguments
Value Returned
Examples
Assume that arguments passed to a SKILL script file are (“my.il” “1st” “2nd” “3rd”):
argv()
=> (“1st” “2nd” “3rd”)
argv(0)
=> “my.il”
argv(1)
=> “1st”
argv(4)
=> nil
An example using a SKILL executable:
$ skill -V
@(#)$CDS: skill version 07.02 09/19/2007 09:08 (cat61lnx) $
$ cat /tmp/foo.il
(printf "argc is %d, argv[0] is %s, argv is %L\n" (argc) (argv 0) (argv))
$ skill /tmp/foo.il -someArg -someArg2
argc is 2, argv[0] is /tmp/foo.il, argv is ("-someArg" "-someArg2")
Related Topics
Function and Program Structure
Return to top