(eplain.info)Properties


Next: \expandonce Prev: Hooks Up: Expansion
Enter node , (file) or (file)node

7.6.4 Properties
----------------

A "property" is a name/value pair associated with another symbol,
traditionally called an "atom". Both atom and property names are control
sequence names.

   Eplain provides two macros for dealing with property lists:
'\setproperty' and '\getproperty'.

'\setproperty ATOM PROPNAME VALUE'
     '\setproperty' defines the property PROPERTY on the atom ATOM to be
     VALUE. ATOM and PROPNAME can be anything acceptable to '\csname'.
     VALUE can be anything.

'\getproperty ATOM PROPNAME'
     '\getproperty' expands to the value stored for PROPNAME on ATOM. If
     PROPNAME is undefined, it expands to nothing (i.e., '\empty').

   The idea of properties originated in Lisp (I believe). There, the
implementation truly does associate properties with atoms. In TeX, where
we have no builtin support for properties, the association is only
conceptual.

   The following example typesets 'xyz'.

     \setproperty{a}{pr}{xyz}
     \getproperty{a}{pr}


automatically generated by info2www version 1.2.2.9