Logiweb(TM)

7.17.10 Definitions

Prev Up Next Page 299 of 800 Search internet


A definition has a left hand side, a right hand side, and an aspect. If a definition occurs on a page with cache c and reference h then the definition is inserted in c[h]['codex'][r][i][R][I]. Here, r and i are the reference and index, respectively of the principal operator of the left hand side of the definition. The reference R and index I of the aspect is determined as follows.

If the aspect is a string, then the reference and index of the string are used as R and I. The reference of a string is zero and the index is the string itself. If the aspect is not a string, then the message aspect of the principal operator of the aspect is looked up. If the construct has no message aspect then the definition is ignored. Otherwise, the message aspect is itself a definition. In this case, R and I are taken to be the reference and index, respectively, of the principal operator of the right hand side of the message definition.

As an example of a bootstrap sequence, consider this:

   proclaim proclaim x as y end proclaim as "proclaim" end proclaim
   proclaim define x of y as z end define as "define" end proclaim
   define "message" of msg as "message" end define
   define msg of val as "value" end define
   define val of foo as "bar" end define

If the definitions above occur on a base page and if proclaim...end proclaim is construct 1, then the bootstrap proceeds thus:

1st reading
proclaim x as y end proclaim is a proclamation construct.
2nd reading
define x of y as z end define is a definition construct.
3rd reading
msg denotes the message aspect.
4th reading
val denotes the value aspect.
5th reading
The value of foo is 'bar'.

The order of the five definitions above is unimportant. One purpose of the harvester and the codex is to make the meaning of a page independent of the order in which proclamations, definitions, and introductions are stated. That improves the notational freedom of authors in that they can arrange definitions in any order they see fit.

Prev Up Next Page 299 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05