Unfortunately, in Pascal, the “and” and “or” operators have precedence over ≥ and ≤, (yeah, I hate that, too, but we can’t mess with 50+ years of history ;), so the code you wrote evaluares as:
((500<2500) and (236 >= (5 and 236) <= 100 ))
true and (236 >= 4 <= 100)
tru and false
false
Rule of thumb when and'ing or or'ing expressions, always our parenthesis around both operands to make the intent clear.
I recommend that even for C# & Co, which do not have this exact issue ("wilg >= 5 && wilg <= 100" would be fine), because, who can really remember what “a || b && c” does?