From: Tom Sawyer Date: 2003-02-09T16:09:09+09:00 Subject: Re: 'static' variables in a proc? On Saturday 08 February 2003 10:51 pm, Phil Tomson wrote: > Is there a way to get a variable in a proc that maintains it's value > between different calls of the proc? a = 1 p = proc { puts a a+=1 } but this is different than a persistant variable, mind you. i recall that VB has these, although i forget how they are designated. in effect you could define procedures (methods) that would retain variable values between calls. wonder how this is effected with the new scoping rules being talked about. -- tom sawyer, aka transami transami@transami.net