‘18’>7 will not throw?
Posted: 31 Jul 2023, 01:00
Since some functions like isdigit only support String without convesion, Shouldn't ‘18’>7 be replaced by Number('18')>7? Currently it will not throw but lead to an implicit conversion.
If operator overloading has been implemented, these below would certainly be more consistent:
If operator overloading has been implemented, these below would certainly be more consistent:
Code: Select all
OutputDebug(18>7) ; it will output 1
OutputDebug('18'>'7') ; it would output 0, just like strComepare, perhaps case insensitive, has overloaded to >. But currently it will output 1
OutputDebug('18'>7) ;it would throw, as an implicit conversion is probably unintended for a user.