﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1147	Comparison of numbers against strings gives unexpected results	jchd	Valik	"The wording used in the helpfile, Datatypes section (when a string is ""used"" as a number) pushed me to try some tests whose results go against the common explanation repeatedly given: ""if a number is compared to a string, the later is evaluated as Number(string)"". In short, we have that:
  (5 = Number(""5abc"")) returns True, but
  (5 = ""5abc"") returns False                !?!
  (""5abc"" = 5) returns False                !?! (just checking)
  (0 > ""5abc"") returns False                !?!
  (1 > ""5abc"") returns True                 !?!
  (5 > ""5abc"") returns True                 !?!

It _sounds_ like the current rules are something along those lines:
  any string containing one or more non-(digit or minus) is evaluated as integer 0

Reals have other rules:
  (5 = 5.  )  returns True
  (5 = '5.')  returns False
  (5. = '5.') returns False

Perhaps the behavior of comparison between strings and numerics should be clarified.  Or Number() should convert the string before comparison, which could possibly break existing (doubtful) code.

I still don't know if this ticket really is a feature request, a documentation clarification request or a bug report."	Bug	closed	3.3.7.20	AutoIt	3.3.1.1	None	Fixed	comparison strings numbers	
