Forum Discussion
Neihls_298286
Nimbostratus
Oct 18, 2017iRule expr arithmetic broken
This arithmetic expression isn't working for me:
set $sum [expr {$integer + 14}]
In debug logs, $integer is 31.
The irule just stops processing.
At one time, I got this tmm error, but not ever again:
invalid command name "expr{31" while executing "expr{$integer + 2}"
- Neihls_298286
Nimbostratus
Never mind.
It didn't work when the expression assigns the sum to the same variable as one of the operands.
E.g. This doesn't work:
set integer [expr{$integer + 14}]
And this does work:
set sum [expr{$integer + 14}]
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