A string doesn't equal itself

J. Landman Gay jacque at hyperactivesw.com
Tue Apr 10 12:39:23 EDT 2007


Bill Marriott wrote:
> As I recall from high school, in scientific notation the whole part of a 
> number expressed this way must be <=1 and <10.
> 
> Possibly a satisfactory enhancement would be to follow a stricter protocol 
> for scientific notation... strings with a single "E" in them being a number 
> if and only if they contain a decimal point after a single leading non-zero 
> digit?
> 
> 09114E715806 = text string
> 0.9114E715806 = text string
> 09.114E715806 = text string
> 9E715806 = text string (hm)
> 
> 9.114E715806 = number

This would be okay with me.

> You could be even stricter by requiring it be an uppercase "E" with a + or - 
> sign following.

This one I like less. Xtalk has always been case insensitive, and 
introducing a single instance of case sensitivity could cause trouble.

In any case, I think documentation is the answer. No matter how the 
problem is resolved at the engine level, people will need to be aware of 
the potential issues.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list