[SR-Users] Odd behavior comparing strings

Alex Balashov abalashov at evaristesys.com
Thu Oct 25 17:07:24 CEST 2018


On Thu, Oct 25, 2018 at 03:10:32PM +0100, Duarte Rocha wrote:

> With "eq" it works as it should.

Well, in principle, '==' ought to work as it should, too. It's still odd
behaviour, I would agree. 

However, 'ne' and 'eq' are the operators explicitly designed for string
comparisons. '==' and '!=' attempt to make appropriate type inferences
based on the types of the operands, and as one can see, not necessarily
consistently or correctly.

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/



More information about the sr-users mailing list