)
One of the basic things you can do with Amool is to define a hierarchical
data structure.
If you're familiar with XML, then you'll see it's pretty much the same thing..
As you already know from the intro, each component in Amool is a class.
A class contains some textual information, plus an optional set of child definitions.
Syntactically, you define a child using the &+ keyword, immediately followed by the name of the child (eg, &+child), and end its definition with the symbol &&
When you take out the child definitions of your Amool code, you get the text content of the class...
&+Family
This is my family:
&+Dad Jack &&
&+Mum Marja &&
&+Daughter Ilo &&
&+Son Max &&
&&
|
This example defines a class named Family, that has four children Dad, Mum, Daughter and Son,
and has as textual contents "This is my family:". |
You can also define more than one child under the same symbol...
&+Computer (My Amiga :) HardDisks: &+HardDisk Work &+Size 900M && && &+HardDisk Boot &+Size 50M && && Cards... &+Card CyberVision 64/3D && &+Card CyberStorm mk3 && &+Card Some audio Card && && |
|
Now you've got a class named Computer, that has got two children, HardDisk and Card; the first one having two definitions and the second one having three. And then, you can see that each definition of HardDisk has a child named Size.
>
Last compiled : Wed Apr 23 21:53:37 CEST 2003