Hi,
I tried to run a simple OTcl script for the first time and got this error 
message: invalid command name "new"
Does anyone know the solution to this?
The archive link is broken (http://www.isi.edu/nsnam/dist/archive/ns-users/) so 
I'm asking on the mailing list.
The code I tried to run was the following:
 
# Create a class call "mom" and 
# add a member function call "greet"
Class mom
mom instproc greet {} {
    $self instvar age_
    puts "$age_ years old mom say:
    How are you doing?"
}
# Create a child class of "mom" called "kid" 
# and overide the member function "greet"
Class kid -superclass mom
kid instproc greet {} {
    $self instvar age_
    puts "$age_ years old kid say:
    What's up, dude?"
}
# Create a mom and a kid object set each age
set a [new mom]
$a set age_ 45
set b [new kid]
$b set age_ 15
# Calling member function "greet" of each object
$a greet
$b greet
 
Thanks                                    

Reply via email to