Forum Discussion
Nik
Cirrus
Feb 07, 2015breaking out of a switch statement?
is it possible to break out of a switch statement like you would a loop? the break command doesn't seem to work.
my goal is to say.. if condition is met then use the default action, like this:
...
giltjr
Nimbostratus
Feb 07, 2015I guess it depends on how many conditionals there are also. If "foo" is the only conditional, then this would be simpler:
if {"foo"} {
if {good condition} {
Do whatever
} elseif {bad condition {
set badFlag 1
}
}
if { [info exists badFlag] && $badFlag } { tell the user he sucks }
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