Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

invalid command name

12 views
Skip to first unread message

shady.ab...@gmail.com

unread,
May 4, 2008, 10:21:36 AM5/4/08
to
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?

Gerald W. Lester

unread,
May 4, 2008, 12:55:22 PM5/4/08
to

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|
+------------------------------------------------------------------------+

Arjen Markus

unread,
May 5, 2008, 5:13:06 AM5/5/08
to
On 4 mei, 18:55, "Gerald W. Lester" <Gerald.Les...@cox.net> wrote:
>
> 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 "-".
>

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

USCode

unread,
May 5, 2008, 12:30:17 PM5/5/08
to
Arjen Markus wrote:
> 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 ... ;-)

0 new messages