KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
From what I can tell, = and != is supposed to work on strings in OCaml. I'm seeing strange results though which I would like to understand better. When I compare two strings with = I get the results I expect: # "steve" = "steve";; - : bool = true # "steve" = "rowe";; - : bool = false but when I try != I do not: # "steve" != "rowe";; - : bool = true # "steve" != "steve";; (* unexpected - shouldn't this be false? *) - : bool = true Can anyone explain? Is there a better way to do this?
Tags (comma-separated)
Save Edits
Cancel