Can't do the math
Bill Vlahos
bvlahos at jpl.nasa.gov
Fri Mar 1 18:15:01 EST 2002
It doesn't work either. Strangely enough, if I do it the original way,
even lines that resulted in 2 spaces, if I put word 3 after the field
the correct numbers were put in. I'm still puzzled.
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