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
Joined January 20, 2005
Jim_Deucker
Employee
Joined September 02, 2019
JRahm
Admin
Joined January 20, 2005
Kai_Wilke
Jan 10, 2023MVP
Hi 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