Logiweb(TM)

7.16.3 Defining a new request type

Prev Up Next Page 274 of 800 Search internet


The base page defines as machine named lgciotest which exercises the facilities of the lgcio-interface. To support that, the base page defines the following construct:

   eager define lgcio ( v ) as
   << quote lgcio ( v ) end quote head ,, v >> end define

Thus, the value of lgcio ( v ) has form << << r ,, i ,, d >> ,, v >> where r and i are the reference and index, respectively of the lgcio construct itself. The value of d is debugging information which is ignored.

The lgciotest machine loads the lgcio-interface using the following extend request:

<< << 0 ,, !"extend" >> ,, lgcio ( true ) ,, lgcio-interface >>

The extend request allows to use lgcio ( v ) as a new request type.

If a machine loads more than one interface, it must use a unique request type for each of them. In other words, the values of r and i must be unique. The reference r and index i of a construct provide a world-wide unique identification of the construct. Thus, as long as one uses distinct constructs for expressing distinct request types, and as long as one uses the reference and index of the constructs for representing the request type as is done above, one can be sure there will be no collisions.

Prev Up Next Page 274 of 800 Search logiweb.eu

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