Re: invalid command name
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Sun, 04 May 2008 11:55:22 -0500
shady.abdelwahed@xxxxxxxxx wrote:
Hi All,
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|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: invalid command name
- From: Arjen Markus
- Re: invalid command name
- References:
- invalid command name
- From: shady . abdelwahed
- invalid command name
- Prev by Date: LSrPGZAppkyhJjjgI
- Next by Date: Re: Regular expressions question
- Previous by thread: invalid command name
- Next by thread: Re: invalid command name
- Index(es):
Relevant Pages
|