can't compare strings.
Closed this issue · 1 comments
skits4107 commented
I cant compare strings in conditional statements. for example this code produces an error:
pwease baka = "hewwo"
pwease awoo = "hewwo"
IF awoo==baka THWEN pwint("they are equal ") EWSE pwint("twy again")
the error message is
Traceback (most recent call last):
File test.pyowo, line 4, in
owo, whats this? Runtime Error? Oh nwo! : Illegal operation
IF awoo==baka THWEN pwint("yay") EWSE pwint("twy again")
__^^^^^^^^^^
Swiddis commented
Looks like String
s don't have the comparison operators implemented. They're defaulting to Value
's implementation that returns an illegal operation error.
This can be fixed by overriding the Value comparison operators with an implementation around here.