Posted to tcl by bjorkintosh at Thu Nov 16 03:53:22 GMT 2023view raw
- # fancyspace.tcl starts here
- namespace eval fancyspace {
- variable var1
- variable var2
- proc foo { } {
- variable var1 "Hello from fancyspace"
- variable var2 42
- puts $var1
- puts [expr $var2 + 10 - 10]
- }
- namespace export *
- }
- #source2.tcl starts here
- source fancyspace.tcl
- namespace eval lave {
- variable var1
- variable var2
- proc bar { } {
- variable var1 44
- variable var2 "this is just space"
- ::fancyspace::foo
- }
- }