This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

global variables

Old posts that have not been replied to for several years.
Locked
l
laidas
Voice
Posts: 18
Joined: Thu Jul 25, 2002 10:07 am

global variables

Post by laidas »

How to set up a global variable from process ?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You would need to be more specific.

My guess is somthing like this

Code: Select all

set globalvar "value"
proc thisproc {} {
  global globalvar
  puts stdout "PROC $globalvar"
  set globalvar "value2"
  puts stdout "PROC $globalvar"
}

puts stdout "NORM $globalvar"
thisproc
puts stdout "NORM $globalvar"
Locked