Björnke von Gierke
bvg at mac.com
Tue Mar 8 08:32:34 EST 2011
I'm not sure i understand the problem. given:
sort by word 2 of each
put lineoffset("paul", theList) - lineoffset ("peter") into theCompare
if theCompare < 0 then
--child one is younger
--child 2 is younger
that should solve all cases, unless they're the same age, which you need to check with a direct comparision (if word 2 of child1 = word 2 of child2 then sameAge)...
of course you could as well always use comparisions, and i'm sure you'd think of that yourself. so i really don't understand the question it seems.
On 8 Mar 2011, at 14:15, Malte Brill wrote:
> Hi folks,
> this is over my head. I have a problem I can not tackle alone, so please let me scream for help...
> Imagine a group of kids:
> Paul,Peter,Fritz,Madeleine,Joanne (and any additional number of kids)
> I want to programmatically test on age relations of those kids:
> e.g. Peter is older than Paul, Joanne is the same age as Paul.
> Now I want to be able to test if the statement Joanne is older than Peter (or same age, or younger) are valid or not.
> I will need to be able to do this for all kids in the group. Any ideas on how to tackle that???
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode