Case Mapping



next up previous contents index
Next: Extending REDTEN Up: Enhancements Previous: Miscellaneous

Case Mapping

  REDTEN is a two-case system, with the primary input being in lower-case. However, the underlying lisp system in which REDUCE is implemented may be either upper- or lower-case. If it is upper-case, all REDUCE and REDTEN functions will be defined in that case, despite the fact that the sources are in lower case, except in special protected situations. For these systems a small package is provided to map the names of commonly used functions from the lower-case input to the upper-case definitions. The user may thus type either sin() or SIN() to use the sine function; and similarly for a large number of other functions, switches and variables. Any identifier that is not case mapped may be made so in the following fashion:

 
#: PUT ('mapthisname, 'NEWNAM, 'MAPTHISNAME);
which will cause the parser to replace any occurance of the first name with the second. This will only work correctly if the default REDTEN behaviour of not mapping any characters to an alternate case remains enabled (i.e. the REDUCE switches raise and lower are both off).

The mapping method shown above cannot be used for the special symbol nil, since NIL as an input to put() removes the property on the key NEWNAM. For this identifier only, and the, the user must use the correct case.


John Harper
Wed Nov 16 13:34:23 EST 1994