This should be an easy one for someone…
I had a function in a TCL script called unwrap. Modifying it, I realized I no longer needed to pass it args.
So I changed it to
unwrap {} {
...
}
Now when I call it with no args, i.e.:
unwrap
I get an error invalid command unwrap
Ideas? How do I properly format a TCL function with no args?
I tried to use this reference, which showed a call identical to mine:
http://users.belgacom.net/bruno.champagne/tcl.html
Is that page incorrect?
FYI, removing the inner code and inserting it into the spot of the call works, so I know its just my syntax, not the function code itself.
Thanks in advance!
You forgot the
procWhat probably happened in your interpreter was that you defined
unwrapwith args first, and then when you forgot theprocthe second time, you didn’t get an error b/c the interpreter just thought you were callingunwrapitself (instead of redefining it, which is what you wanted).