TMSH Scripting, using the proc script::init {} in the tmsh editor

I’m trying to use the tmsh script editor in the command line to create a tmsh script. I have been successful in my efforts when initializing and running all tmsh commands in the proc script::run {} script. Now I would like to try another method of doing the same thing by creating separate proc functions for different functionalities, using the “global” variables that are initialized in the proc script::init{}

My question is how do I use the “global” variables that I have created in that proc script::init {} in other procs that I have created to do other functions?

I’m new to the TCL language, but as I understand it variables need to be placed in namespaces. I have created my variables by putting them into the global namespace by using “set ::VariableName.”

I have tried some methods from research I’ve done on Google, but those have not worked for me.

Documentation: DevCentral - An F5 Technical Community

Thanks you

I know I can achieve the same output in other well known methods, but I want to try something new.

Nevermind, I have figured it out. Tried to delete question, not sure if deleted.