iRules Style Guide
This article (formatted here in collaboration with and from the notes of F5er Jim_Deucker) features an opinionated way to write iRules, which is an extension to the Tcl language. Tcl has its own st...
Updated May 20, 2024
Version 4.0JRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.Jim_Deucker
Employee
Author of vscode extensions for iRules, iApps and Tcl, https://github.com/bitwisecookJRahm
Admin
Christ Follower, Husband, Father, Technologist. I love community and I especially love THIS community. My background is networking, but I've dabbled in all the F5 iStuff, I'm a recovering Perl guy, and am very much a python enthusiast. Learning alongside all of you in this accelerating industry toward modern apps and architectures.Kai_Wilke
MVP
Jan 10, 2023Hi Jason,
you may review your topic 10.), since it provides slightest false information. I assume you accidentially just mixed up || vs. && with eq vs == in on scentence?
"eq" or "ne" is different from "==" or "!=".
"==" or "!=" should only be used for numeric comparsions only
"eq" or "ne" should be used for string comparions.
Examples of the math behind == comparsions:
1 == 1.0 is true
1 == 0001 is true
1 == "0x0000001" is true
1 == "\n\n\n\t\t\t1.e0\n\n\n" is also true
1 == 1.000000000000000031337 is also true
10 == 012 is also true
Beside of this using "eq" to compare "strings" is faster than comparing them with "==" (since no shimmering is involved).
The difference of || / && vs. "or" / "and" are not that huge. I consider the differences as personal preferecens... 😉
Cheers, Kai