Closed mayupumi closed 4 years ago
Sorry for the late response. Your Tcl syntax is not correct. elseif should not be on a new line (its not a keyword, it's a parameter to the if command.
if {boolean_expression 1} {
# Executes when the boolean expression 1 is true
} elseif {boolean_expression 2} {
# Executes when the boolean expression 2 is true
} elseif {boolean_expression 3} {
# Executes when the boolean expression 3 is true
} else {
# executes when the none of the above condition is true
}
Hi. Thanks for developing the great tool. I faced weird error but I'm not sure it's right behavior or not.
Here is a simple iRule else.tcl that I want to apply test:
I want to test both condition (if and elseif) with one testcl file, so I wrote _testelse.tcl like
However, it will produce an error on the second test.
Same error occur when I use
else
instead ofelseif
to test the second condition. I found out that it will be done successfully if I useif
for each condition like:but it's not the code I want to test. Do I have some mistake or it's right behavior?