It is like the set command because it can define a value for the variable. You can declare several namespace variables with one variable command. If you have an array, do not assign a value in the variable command. Instead, use regular Tcl commands after you declare the variable. A namespace variable is similar to a global variable because it is outside the scope of any procedures.
Procedures use the variable command or qualified names to reference namespace variables.
It is only useful there to give the namespace variable an initial value. If a procedure has a variable command that names a new variable, it is created in the namespace when it is first set. A fully qualified name unambiguously names a procedure or a variable. The fully qualified name works anywhere. If you use a fully qualified variable name, it is not necessary to use a global command.