'''namespace current''' Returns the fully-qualified name for the current namespace. The actual name of the global namespace is "" (i.e., an empty string), but this command returns '''::''' for the global namespace as a convenience to programmers. ---- [Jasp] The so called convenience of returning ''::'' has actually become an annoyance for me. The following code is supposted to take the argument variable ''database'', containing a procedure name, and get it's full path (prepend command works like append, except inserts the concentration of arguments at start of variable): if {[string range $database 0 1] != "::"} { ::emerald::data::prepend database [uplevel 1 {namespace current}] ::} This code works fine all the time, except when '''namespace current''' returns ''::''. ''database'' then becomes something like ''::::procedure'' instead of ''::procedure''. I'm going to do a check with [if] and not prepend ''::'' for this result for now, can anyone recommend a better solution? I think ''namespace current'' needs an argument like '''-actual''' to prevent this behaviour. -- [RS]: Except for ugly looks, :::: will not hurt your program execution, as "two or more colons" are parsed as namespace separator. -- [schlenk] You may even use the wrong tool for the job, [namespace which] could be more like what you want. [Jasp] Ah!, why did I miss [namespace which] while reading the manual?, knowing of it will help. Currently in the procedure of this code, the procedure specified in ''database'' may not yet exist, but only when using certain "subcommands". However with your notes in mind, I should be able to modify it to work correctly without current hack. Thanks. :) ---- See also: * [namespace] * [namespace children] * [namespace parent] ---- [Category Command] - [Tcl syntax help]