On Tue, 2 Nov 1999, Thomas McKay wrote:

Nope, you need to use "namespace eval {...}"

Try this.

% namespace eval foo {
  variable x
  set x 12
}

% set foo::x
12


You can create a namespace like this "namespace eval foo {}".

If you run into problems, please check to see if you code
works in Tcl 8.X. If you find code that does not work the
same as Tcl 8.X, I want to hear about it.

later
mo

> Should the following work?
> 
> namespace foo {
> variable x
> set x 12
> 
> proc y { a } {
>    puts $y
> }
> }
> 
> I get an unrecognized arg foo, should be eval, etc.  Looking at the code it
> sure seems like this won't work.
> 
> How do I create a namespace then?
> 
> ---
> Thomas McKay
> 
> Project Leader
> Microcosm Technologies, Inc.
> mailto:[EMAIL PROTECTED]
> 
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by Scriptics Corporation.
> To subscribe:    send mail to [EMAIL PROTECTED]  
>                  with the word SUBSCRIBE as the subject.
> To unsubscribe:  send mail to [EMAIL PROTECTED] 
>                  with the word UNSUBSCRIBE as the subject.
> To send to the list, send email to '[EMAIL PROTECTED]'. 
> 

----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 

Reply via email to