You’d think TCL argument processing has been done and would be easy to find. But not for me. Here are my notes,
- An article called command line arguments, it has some sample TCL code accessing the $argv object
- At tcl-lang.org, Argument Parsing: a discussion and an extended command called argparse, but I get an invalid command name when using one of their examples. Is
argparse
a python sub-routine? - How to parse_command-line_arguments in Tcl from rosettacode.org
- and good old stack overflow package-for-parsing-argument-in-tcl, with several examples. I have hit a problem and asked for help at askubuntu.
If it gets too hard I can always parse the command line in shell, which I did, see my smsg parser, as ever with TCL, I am sure my code could could be less verbose. I looked at associative arrays and displaying them. I revised some procedure stuff, and string manipulation.