Chris_Phillips
Aug 03, 2006Nimbostratus
Scoping variables
Hi,
I had a thread recently which lead to this wiki entry http://devcentral.f5.com/wiki/default.aspx/iRules/DestinationSnatUsingDNS.html and one instance of this iRule works fine, however as every variable used there is global, another instance requires the change of every variable name involved, otherwise they overwrite each other. This is obviosuly fairly horrible, yet if we define the variable within the RULE_INIT block that variable is lost outside of there once its completes its execution.
is there a nicer way that somehow falls inbetween these two situations?
Thanks
Chris