Re: Nested Relations / RVAs / NFNF
Date: 30 Oct 2004 06:10:41 -0700
Message-ID: <bcb8c360.0410300510.22cd257e_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