View Single Post
Old 10-21-2024, 05:18 PM   #736
1ily
Connoisseur
1ily doesn't litter1ily doesn't litter
 
Posts: 63
Karma: 190
Join Date: Sep 2023
Device: Kobo Libra 2
Quote:
Originally Posted by chaley View Post
You are using the string (lexical) comparison operator (<) instead of the numeric comparison operator (<#).

As said in the template language manual, which is your friend:


BTW: the first_matching_cmp() or the switch_if() functions seem to satisfy your needs and are faster than a series of if statements.

BTW2: it seems you should be using >=# in the second relational clause of the if statements. Otherwise you are skipping exact matches.
Thank you for your help. I added switch_if() statements and updated the relational clauses as recommended. This fixed it, and it works flawlessly!
1ily is offline   Reply With Quote