Forum Discussion
Nuno_Paulino_10
Nimbostratus
Aug 09, 2006Floating values in iRules
Hello!
I am trying to use floating values in iRules and I am having some problems. When i run the following code:
when HTTP_RESPONSE {
set clicks_server_response [expr [clock clicks -milliseconds] / 1000.0]
log local1.info $clicks_server_response
}
I am getting in the logs the string "%g", instead of the corresponding floating value:
... : %g ...
I tryed to use the "format function" and i found the same problems. Does the iRules "TCL subset" suports floating values ?
I even tryed a simple example from manuals and the result is also the "%g" string
% set result [expr (4.0+6)/4]
=> %g
Any ideas?
Best regards,
Nuno Paulino
3 Replies
- Deb_Allen_18Historic F5 AccountI dug into this a bit and found also that using [format %f ...] to force to floating point returns "%f" instead of a numeric value.
- Deb_Allen_18Historic F5 AccountFrom Support:
- JRahm
Admin
Optimized.... so that's what we're calling bugs these days! We used to call them *features* (he he)
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