Reputation: 89
I have come across a script (a section of it is shown below) which uses switches/options with set
and proc
in Tcl. Need help with the use and purpose of using the following constructs i.e switches and options with set
and proc
...
set opt_args {
-login_user ANY
DEFAULT lab
-login_passwd ANY
DEFAULT lab
}
set man_args {
-ti ANY
-ra_name ANY
-r_name ANY
}
aetest::script_init -mandatory_args $man_args \
-optional_args $opt_args -return_direct \
-common_section_id last_test_id
Upvotes: 0
Views: 104
Reputation: 386030
It looks like script_init
expects some string literals as arguments. You'll need to consult the documentation for that function to know how they are interpreted. Most likely it's a little DSL (domain specific language) for defining mandatory and optional arguments.
The things that might look like options to the set command aren't -- it's all just data.
Upvotes: 1