XEROX READDATATYPE 2 4 1 READDATATYPE 1 4 By: Christopher Lane (Lane@Sumex-Aim.Stanford.Edu) READATATYPE gives @ a read macro definition (in the INTERLISP readtable) so that it can be used to type in datatype pointers directly. For example, suppose you have lost your pointer to a window (or menu, etc.) but you have the printed representation around (eg. {WINDOW}#56,17470) then you can do things like: 90_(INVERTW @{WINDOW}#56,17470) {WINDOW}#56,17470 The read macro is only intended to be used at the read-eval-print loop. If the character following the @ is not a { then the read macro returns the @ character just as if you had typed it in so that other expressions that use @, like `(A B ,@FILELST C D), will still work correctly. Although the read macro does not need the data type name in the brackets (eg. {MENU}) to get the pointer, it does require it in order to check the pointer to make sure it is of the correct type. If the pointer is not of the type specified, then the read macro returns NIL. The following form is used in the COMS of the file to set the syntax of @ in the INTERLISP readtable and can be used to add the capability to other readtables and/or characters: (SETSYNTAX '%@ '(MACRO FIRST READDATATYPE) (FIND-READTABLE "INTERLISP"))(LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 224) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))(È(È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADMODERN TERMINAL TERMINAL MODERN MODERN MODERN MODERNLOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN 4! Ë 2' !M NiLH X . õHzº