Since object keyvals may contain any keys and values whatever, we may in particular use objects as the values:
Stack: makeIndex --> a ( Put a new object in variable 'a ' ) Stack: makeIndex --> a.b ( Next object goes under key 'b' on first object ) Stack: makeIndex --> a.b.c ( Next goes under key 'c' on second object. ) Stack: 12 --> a.b.c.d ( Store 12 under key 'd' on third object. ) Stack: a.b.c.d ( Verify that we can retrieve above value. ) Stack: 12
Expressions such as a.b.c.d
are merely convenient
shorthand which the Muq MUF compiler expands into
longer expressions: They don't let you do anything which you
could not do otherwise. In particular, instead of writing
a.b.c.d
we could have written:
a :b get :c get :d get
(The latter is really much more in the spirit of MUF, really, but the former is so convenient that I couldn't resist including it as an alternative.)
This syntactic convention, together with the ability to use objects as key values, lets us build trees of objects within the Muq database which provide an indexing system similar to the hierarchical directory trees used in Unix and MS-Dos and MacOs.
Go to the first, previous, next, last section, table of contents.