lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


test case:

require "lunichar"
print (UniChar.equals == getmetatable(UniChar).__eq)
print ()

uc1 = UniChar(255)
-- compare using equals()
print (uc1:equals(UniChar(255)))
print (uc1:equals(255))
-- compare using ==
print (uc1 == UniChar(255))
print (uc1 == 255)

--> output:
true

true
true
true
false

??? Não entendo... Seems equals() is not called in last case.

Denis

PS: Is there a way to avoid newline at end of print()?
________________________________

la vita e estrany

http://spir.wikidot.com/