Forum Discussion
smp_86112
Cirrostratus
May 04, 2010v10 - local vs. global vars
Trying to wrap my mind around how this variable scope works. I have a simple iRule I'm testing with:
when HTTP_REQUEST {
global client_local [TCP::local_port clientside]
if...
smp_86112
Cirrostratus
May 04, 2010Thanks for laying out the three different ways to define global variables. Let me narrow this down a bit - I can define a global variable, but how then do I reference it?
global client_local [TCP::local_port clientside]
if {$client_local == 443} {
set protocol "https"
}
Results in:
can't read "client_local": no such variable while executing "if {$client_local == 443} { set protocol "https" }"
Is there a different syntax to reference a global variable?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects