From: Tom Rauchenwald Date: 2006-05-25T03:29:41+09:00 Subject: Re: ifs and scope newbie writes: > how do i update a second if with the results from a first > > ie > > if (something) > #do a bunch of stuff > firstif = TRUE > end > > if (somethingelse && firstif) > # the above always fails since the second if doesn't see firstif) > #do other stuff that is dependent on the first bunch of stuff > firstif = FALSE > end Declare firstif outside of the scope of the if, for instance: firstif=nil if (something) #do a bunch of stuff firstif = true end or, in this case firstif=if(something) #do stuff true end would also be possible. > > thanks Tom