Testing for numerics

Jim Ault JimAultWins at yahoo.com
Tue Oct 3 16:21:05 EDT 2006


> On 10/3/06 12:11 PM, "Jim Ault" <JimAultWins at yahoo.com> wrote:
>> 
>> if field "MyTextField" is an integer and field "MyTextField" > -0.1
> 
> Can't you use just "> 0" ?
> 
>   if field "MyTextField" is an integer and field "MyTextField" > 0
> or:
>   get fld "MyTextField"
>   if (it is an integer) and (it > 0)

 I thought that 0 was a valid positive (non-negative) integer, therefore

 if field "MyTextField" > -0.1
or 
if field "MyTextField" > -1

but if the requirement is "> 0" then Ken is right.

Jim Ault
Las Vegas





More information about the use-livecode mailing list