Logiweb(TM)

7.1.8.5 The empty qualifier

Prev Up Next Page 155 of 800 Search internet


Now consider the three lgs source texts again with some changes of page.lgs. The first lgs source text is as before:

   ""P ref1
   ""R base
   ""D 0
   a
   b
   ""D 6
   " + "
   " - "
   ""B
   "We just include name definitions "[ ""N ]"
   and charge definitions "[ ""C ]" in the body"

The second lgs source text is as before:

   ""P ref2
   ""R base
   ""D 0
   x
   y
   ""D 4
   " * "
   ""D 6
   " + "
   ""B
   "We just include name definitions "[ ""N ]"
   and charge definitions "[ ""C ]" in the body"

The third lgs source text is page.lgs:

   ""P page
   ""R"r1_"ref1
   ""R ref2
   ""B
   a * x r1_+ b * y

In the example above, constructs from ref1 are qualified by both r1_ and the empty string. The empty string hides right after ""R in the second line of page.lgs.

Thus, one can refer to a from ref1 both as r1_a and as a. Constructs from ref2 are unqualified, so one can refer to x from ref2 as x and nothing but x.

One can refer to the plus operator of ref1 as r1_+, but if one tries to use + without qualification one will get an error about Use of ambiguous construct. With the qualifiers above there is no way to refer to the plus operator of ref2.

Prev Up Next Page 155 of 800 Search logiweb.eu

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