From: ptkwt@...1.aracnet.com (Phil Tomson) Date: 2003-02-09T17:31:32+09:00 Subject: Re: 'static' variables in a proc? In article <200302090025.11716.transami@transami.net>, Tom Sawyer wrote: >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 >} > Right, I know that would work, but it's not exactly what I'm looking for in this case as I might want to use the proc in several places and I would like to have 'a' be different in each. Phil