Can't do the math

Bill Vlahos bvlahos at jpl.nasa.gov
Mon Mar 4 12:40:01 EST 2002


Thanks for the suggestions. This is, in fact, what worked. The field 
came up blank because there weren't any entries in the range (gotta 
check the data) and I had a typo.

Thanks,
Bill Vlahos

On Friday, March 1, 2002, at 02:27  PM, Yates, Glen wrote:

> When parsing words, multiple spaces are ignored, so word 3 ends up 
> being the
> first user in the group, not the group number you want to test against, 
> so
> try this instead.
>
>   set the itemDelimiter to ":"
>   repeat with x = 1 to the number of lines in varAllGroups
>     if item 3 of line x of varAllGroups > 100 then
>       put first item of line x of varAllGroups & return after field
> "allgroups"
>     end if
>   end repeat
>
> -Glen Yates
>
> -----Original Message-----
> From: Bill Vlahos [mailto:bvlahos at jpl.nasa.gov]
> Sent: Friday, March 01, 2002 3:59 PM
> To: use-revolution at lists.runrev.com
> Subject: Can't do the math
>
>
> Using Rev 1.1.1B1 on Mac OS X the if statement below doesn't work
> correctly.
> Here is the variable varAllGroups:
>
> root::0:root
> other::1:
> bin::2:root,bin,daemon
> sys::3:root,bin,sys,adm
>
> Here is the script:
>
>    replace ":" with space in varAllGroups --to make words for parsing
>    repeat with x = 1 to the number of lines in varAllGroups
>      if word 3 of line x of varAllGroups > 100 then
>        put first word of line x of varAllGroups & return after field
> "allgroups"
>      end if
>    end repeat
>
> The if statement doesn't do the math correctly. The lines 1, 3, and 4
> evaluate to true when they shouldn't.
>
> Bill Vlahos
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list