Passable Relations

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous



  • Section: Esoterica

    We can ask for (but not change) three properties of a relation: "printed name", "kind", and "description". Printed name is the one-word name, such as containment; it is this that the activity prints by default. Description only exists for newly declared relations; it is the entire definition sentence. The major kinds we are usually interested in are: Relation_OtoO, Relation_OtoV, Relation_VtoO, Relation_VtoV, Relation_Sym_OtoO, Relation_Sym_VtoV, Relation_Equiv, Relation_ByRoutine and Relation_ByHalfRoutine. The last two cannot be assigned to. There are other types, but like Relation_Implicit, they are of little use to us.

    Relations can be typecast to and from numbers with the "as a relation" and "as a number" phrases. For example, the following will (in Glulx) list every relation in a work, no matter how obscure or esoteric:
        repeat with X running from 0 to the number of relations begin;
            say "[X]: '[X as a relation]' is a [the kind of relation X] relation ('[description of relation X]').";
        end repeat;