Forum Discussion
Altera_Forum
Honored Contributor
17 years agoThe list 'argv' is not set when you source a tcl script.
Instead, you can define a procedure with 'proc', and call it after you source your script. For example, suppose you have the following code in hoge.tcl. The code block defines a procedure named 'argument'. It takes two arguments. proc argument {first second} { puts "first=$first" puts "second=$second" } To call the procedure, you need to source the script first: tcl> source hoge.tcl Then you can call it as follows. This example passes two arguments: aaa and bbb. tcl> argument aaa bbb The following will be output: first=aaa second=bbb Hope this helps.