argc
argc(
)
=> n / 0 / -1 / -2
Description
Returns the number of 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
|
Argument list is |
|
Examples
Assume that arguments passed to a SKILL script file are ("my.il" "1st" "2nd" "3rd"):
argc() => 3
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