Forum Discussion
Robert_47833
Jul 21, 2011Altostratus
closing brackets before "else"
Hi,dear Irule
if {[class match $uri starts_with gen3abURLs_SRWD29]} {
if { rand() <0.2 } {
pool cjj-BRX set cjjA_cookie 1
return
}
else {
pool cjj-BROWSE
set cjjB_cookie 1
return
}
}
Hi,in a http request event,if I submit rule like above,it told me undefined procedure :else
but if I changed it to rule like below,it is fine,why should I put else after the closing brackets,how to work around this?
if {[class match $uri starts_with gen3abURLs_SRWD29]} {
if { rand() <0.2 } {
pool cjj-BRX
set cjjA_cookie 1
return
} else {
pool cjj-BROWSE
set cjjB_cookie 1
return
}
}
- hooleylistCirrostratusDoctor it hurts when I do this!
- Robert_47833AltostratusHaha
- If you don't care to much about readability.. you could leave it out...
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