Re: Nested Relations / RVAs / NFNF

From: Tony Douglas <tonyisyourpal_at_netscape.net>
Date: 30 Oct 2004 06:11:05 -0700
Message-ID: <bcb8c360.0410300511.1c98e370_at_posting.google.com>


neo55592_at_hotmail.com (Neo) wrote in message news:<4b45d3ad.0410291832.47baf807_at_posting.google.com>...
> > ...how would you represent "two kilograms" in a program ?
>
> With XDb2:
>
> // Create necessary classes
> CREATE2 *qty.cls = thing;
> CREATE2 *unit.cls = thing;
> CREATE2 *mass.cls = thing;
>
> // Create 2kg
> CREATE2 *;
> CREATE2 it.cls = mass;
> CREATE2 it.qty = +2;
> CREATE2 it.unit = +kg;
>
> "it" is 2kg. One view of above in a tree is shown below:
>
> thing
> inst: mass
> inst: 2 kg
> qty: 2
> unit: kg
>
> // Create a person who's mass is 2kg
> CREATE2 *person.cls = thing;
> CREATE2 *john.cls = person;
> CREATE2 john.mass = (%.cls=mass & %.qty=2 & %.unit=kg);
>
> thing
> inst: person
> inst: john
> mass: 2 kg
> qty: 2
> unit: kg

Well, *that's* mnemonic, I'm sure ... !

Cheers,

  • Tony
Received on Sat Oct 30 2004 - 15:11:05 CEST

Original text of this message