I have followed the example in the this link:
http://www.flightlab.com/~joe/gutter/doc/tcllib-1.8/interpolate.html
the script is as follows:
package require Tcl
package require struct
package require math::interpolate
set coeffs [::math::interpolate::prepare_cubic_splines {0.1 0.3 0.4
0.8 1.0} {1.0 2.1 2.2 4.11 4.12}]
foreach x {0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0} {
puts "$x: [::math::interpolate::interp_cubic_splines $coeffs
$x]"
}
but when i try to run it, i receive an error message that
the ::math::interpolate::prepare_cubic_splines and
the ::math::interpolate::interp_cubic_splines are invalid command
names.
why does that happen?
Because it appears there are some typos in the documentation. If you would
do a [info procs ::math::interpolate::*] you will see that the "_" should
really be "-".
Another way for you to have determined this was to take a peek at the code
(it is all Tcl).
NOTE -- I've *never* used this package nor even looked at it until today.
It took two minutes to figure out the problem. I point this out not to
chide you, put rather to show you how you can "get moving again" faster some
of the time.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
Hm, I should correct that, as I am responsible for
this subpackage. (The - is somewhat atypical for me,
don't know why I used that instead of _ ...)
Regards,
Arjen
You're human, we forgive you ... ;-)