in reply to Comparison based on type of value held by variables

They do match because their value is 0.

please also note, that you should remove leading zeros. Please compare the outputs:

print 5+010; print 5+010.4; print 5+ 10; print 5+ 10.4;

13
134
15
15.4


s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e

Replies are listed 'Best First'.
Re^2: Comparison based on type of value held by variables
by ranjan_jajodia (Monk) on Oct 18, 2005 at 13:52 UTC
    Hi Skeeve,
    So does that mean that all strings evaluate to 0 value in numerical comparison?
    Regards,
    Ranjan

      Yes. The numerical value of any string that is not a valid representation of a number is 0.


      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
        Thanks Skeeve. I will keep that in mind.
        Regards,
        Ranjan