home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / LISP / PDLISP.ZIP / MANUAL2.DOC < prev    next >
Encoding:
Text File  |  1986-08-13  |  193.7 KB  |  9,109 lines

  1.  
  2.  
  3.  
  4.           PDLISP language manual                    Character Strings
  5.           
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                                    Chapter 10
  16.  
  17.                                 Character Strings
  18.  
  19.  
  20.  
  21.           The  following  functions  are  provided  with  PDLISP   to
  22.           manipulate strings:
  23.  
  24.  
  25.           STRCAT              CSUBR       (&REST STRING)
  26.           STRCMP              CSUBR       (STR1 STR2)
  27.           STREQ               CSUBR       (STR1 STR2)
  28.           STRINGP             CSUBR       (X)
  29.           STRLEN              CSUBR       (STR)
  30.           STRXTRC             CSUBR       (STR I J)
  31.  
  32.           
  33.  
  34.  
  35.  
  36.  
  37.           10.1 STRCMP and STREQ
  38.  
  39.  
  40.             STRCMP and STREQ  are  functions which are used in PDLISP
  41.           to allow the comparison of the lexical  order  of  strings. 
  42.           (STRCMP  arg1  arg2)  returns  an  integer  based  upon  the
  43.           comparison of its 2 arguments, as follows:
  44.  
  45.  
  46.           value returned:     meaning:
  47.           -1                  str1 < str2
  48.            0                  str1 = str2
  49.            1                  str1 > str2
  50.  
  51.           STREQ is a  bit simpler function.  It returns the value of T
  52.           if  its 2 arguments are lexically  the  same,  otherwise  it
  53.           returns a value of NIL.
  54.  
  55.             Here are some examples of STRCMP and STREQ:
  56.  
  57.           
  58.  
  59.  
  60.  
  61.  
  62.                                      - 135 -              Version 1.10
  63.           
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.           PDLISP language manual                    Character Strings
  71.           
  72.  
  73.  
  74.  
  75.  
  76.           /USR/LOGIN->(strcmp " E" "b")
  77.           -1                               ;result of comparison
  78.           /USR/LOGIN->(strcmp "b" "a")
  79.           1                                ;"b" is greater than "a".
  80.           /USR/LOGIN->(strcmp "ab" "ab")   ;equality produces
  81.           0                                ; a zero result.
  82.           /USR/LOGIN->(strcmp "abc" "abc ");trailing blank makes "abc "
  83.           -1                               ;lexically greater than "abc"
  84.           /USR/LOGIN->(streq "a" "a")
  85.           T
  86.           /USR/LOGIN->(streq "abc" "abd")
  87.           NIL
  88.  
  89.  
  90.  
  91.  
  92.           10.2 STRLEN and STRLENC
  93.  
  94.  
  95.           STRLEN  returns the length,  in  characters,  of  a  PDLISP
  96.           string.   For example, (STRLEN "a simple string")  evaluates
  97.           to 17. Notice that the double  quote  marks  are included in
  98.           the length of the string.   STRLENC  is similar, except that
  99.           the double quote marks are not  included  when the length of
  100.           the  string  is  included.    So,   in  the  above  example,
  101.           (STRLENC "a simple string") would evaluate to 15.
  102.  
  103.             For  both  of these functions, if the argument  is  not  a
  104.           string,  then if it is a symbol, the  print-name  is  used. 
  105.           Otherwise, if the argument is  not  a string or a symbol, an
  106.           error results. 
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.                                      - 136 -              Version 1.10
  129.           
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.           PDLISP language manual                    Character Strings
  137.           
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.           10.3 STRCAT
  147.  
  148.  
  149.           
  150.               STRCAT is used to concatenate strings. STRCAT takes
  151.           any number of arguments, STR1, STR2, ... STRN. A new
  152.           string is returned which is the result of concatenating
  153.           all of the strings together. For example,
  154.  
  155.           (STRCAT "MARY" " HAD A " "LITTLE LAMB")
  156.  
  157.             ==> "MARY HAD A LITTLE LAMB"
  158.  
  159.  
  160.  
  161.  
  162.           10.4 STRINGP
  163.  
  164.  
  165.           STRINGP returns T if X is a string; otherwise returns NIL.
  166.  
  167.           
  168.  
  169.  
  170.  
  171.  
  172.           10.5 STRXTRC
  173.  
  174.  
  175.  
  176.           STRXTRC             CSUBR       (STR I J)
  177.  
  178.           STRXTRC (standing for "String  eXTRaCt"), is the opposite of
  179.           STRCAT;  it  takes  strings  apart  instead of putting  them
  180.           together.   Given a string, STR, and two integers, I and  J,
  181.           this function returns the substring of STR consisting of the
  182.           Ith element through the  Jth  element, inclusive.  The first
  183.           element of STR is considered to be the 0th element, as if it
  184.           were an array.  If I is greater than  J,  or  if  the region
  185.           that they specify lies outside of  STR,  then  a null string
  186.           ("") is returned.  Also, if J is greater  than  the  dynamic
  187.           length of STR, then only the portion of STR which exists  is
  188.           returned.  For example:
  189.  
  190.  
  191.  
  192.  
  193.  
  194.                                      - 137 -              Version 1.10
  195.           
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.           PDLISP language manual                    Character Strings
  203.           
  204.  
  205.  
  206.  
  207.           /USR/LOGIN->(strxtrc "abcd" 0 2)
  208.           "abc"
  209.           /USR/LOGIN->(strxtrc "abcd" 2 4)
  210.           "cd"
  211.           /USR/LOGIN->(strxtrc "abcd" 4 2)
  212.           ""
  213.  
  214.  
  215.  
  216.  
  217.           10.6 FLATSIZE
  218.  
  219.  
  220.  
  221.           FLATSIZE            CSUBR       (FORM)
  222.  
  223.           FLATSIZE   returns  an  integer  which  is  the  number   of
  224.           characters which would be output if form  were printed using
  225.           PRINT.
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                                      - 138 -              Version 1.10
  261.           
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.           PDLISP language manual                    Character Strings
  269.           
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.           10.7 EXPLODE and IMPLODE
  278.  
  279.  
  280.  
  281.           IMPLODE             LAMBDA      (X)
  282.           EXPLODE             CSUBR       (X)
  283.  
  284.               EXPLODE and IMPLODE are used to convert symbol names
  285.           to a list of individual characters, and back again. The
  286.           individual characters are called character objects,
  287.           and they are actually symbols which are interned in the
  288.           object list.
  289.  
  290.           (explode 'foo)     ==> (F O O)
  291.           (implode '(f o o)) ==> FOO
  292.  
  293.           Currently, EXPLODE and IMPLODE only work on symbol names; if
  294.           they were truly Common LISP  compatible,  they would work on
  295.           arbitrary s-expressions.  For example, we would have:
  296.  
  297.  
  298.           (explode '(a b c)) ==> (#\( a b c #\))
  299.  
  300.           The sharp-sign macros  are necessary in the above example in
  301.           order to enable the LISP reader  to  deal with symbols named
  302.           "("  and ")". We're  planning  upon  upgrading  EXPLODE  and
  303.           IMPLODE up to Common LISP specifications in a future release
  304.           of PDLISP.
  305.  
  306.             IMPLODE creates a string which is the concatenation of the
  307.           print-names  of  the  elements  of  X,  which  must  all  be
  308.           symbols.   If  a  symbol exists along the reader search path
  309.           with this string as its print-name then no action is taken. 
  310.           Otherwise,  the  new  symbol   is  created  in  the  current
  311.           directory.  In either  case,  the  symbol is returned as the
  312.           value of this function.  As an example,
  313.  
  314.           
  315.  
  316.  
  317.                (IMPLODE '(ab c d ef)) ==> ABCDEF
  318.  
  319.           and  the  symbol ABCDEF would be  interned  in  the  current
  320.           directory  if  a  symbol by that name did not already  exist
  321.           along the reader search path. 
  322.  
  323.  
  324.  
  325.  
  326.                                      - 139 -              Version 1.10
  327.           
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.           PDLISP language manual                    Character Strings
  335.           
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.           10.8 GENSTRING
  344.  
  345.  
  346.  
  347.           GENSTRING           CSUBR       (&OPTIONAL X)
  348.  
  349.           GENSTRING creates  a  unique  string.   The string is of the
  350.           form <PREFIX> <SUFFIX>, where <PREFIX> can be any string and
  351.           where <SUFFIX> is an integer.  Initially, <PREFIX> is empty,
  352.           and  <SUFFIX>  is  the   string  "0",  so  that  (GENSTRING)
  353.           evaluates to the string "0". After each  time that GENSTRING
  354.           is called, an internal  counter  is incremented, so that the
  355.           second time that GENSTRING is  called,  the string "1" would
  356.           be generated. 
  357.  
  358.             The current values of <PREFIX> and <SUFFIX> can  be set by
  359.           using the optional parameter, X. If X is present  and  is  a
  360.           string, then <PREFIX> is set to it, and  remains  so altered
  361.           until  it  is set to something else.  The empty string is  a
  362.           legal  PREFIX.  Thus, (GENSTRING "FOO") would set PREFIX  to
  363.           the string "FOO",  and  all  strings  generated from then on
  364.           would be of the form "FOOXX", where XX is some  integer (not
  365.           necessarily 2 digits). 
  366.  
  367.             If  X  is  present and is an integer,  then  the  internal
  368.           counter  is  set  to  X.  So,  the  following   sequence  of
  369.           interactions with PDLISP could occur:
  370.  
  371.  
  372.           /USR/LOGIN->(genstring 3)
  373.           "3"
  374.           /USR/LOGIN->(genstring "FOO")
  375.           "FOO4"
  376.           /USR/LOGIN->(genstring)
  377.           "FOO5"
  378.  
  379.           If X is present and is neither a  string  nor an integer, an
  380.           error is signalled, and the normal error-handling  machinery
  381.           takes over, as follows:
  382.  
  383.  
  384.           /USR/LOGIN->(genstring 'a)
  385.           ***> GENSTRING: illegal &optional arg.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.                                      - 140 -              Version 1.10
  393.           
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.           PDLISP language manual                    Character Strings
  401.           
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.           10.9 GENSYM
  410.  
  411.  
  412.  
  413.           GENSYM              LAMBDA      (&OPTIONAL X)
  414.  
  415.           Creates  a  new symbol with a (hopefully) unique  print-name
  416.           according  to  the rules of GENSTRING. The same  conventions
  417.           which  apply to the arguments for GENSTRING  also  apply  to
  418.           GENSYM. The symbol which is created is not  INTERNed  on the
  419.           object  list,  and  it  is  returned as the  value  of  this
  420.           function.  For a function  which creates an INTERNed symbol,
  421.           see MAKE-SYMBOL.
  422.  
  423.           
  424.  
  425.  
  426.           IMPLODE-TO-STRING   CSUBR       (X)
  427.  
  428.           This  function concatenates the print-names of the  elements
  429.           of X, which must be a list of symbols.  The resultant string
  430.           is returned.  The  string  so constructed is not interned in
  431.           the  object  list;  for  a  function which  does  that,  use
  432.           IMPLODE.  As  an  example,  (IMPLODE-TO-STRING '(x y zz  y))
  433.           would evaluate to the string "XYZZY".
  434.  
  435.  
  436.           INTERN              CSUBR       (X &OPTIONAL D)
  437.  
  438.           Interns a symbol in the object  list with a print-name of X,
  439.           which must be a string.  The symbol is interned in directory
  440.           D if D is provided; otherwise, the symbol is interned in the
  441.           current directory. 
  442.  
  443.           
  444.  
  445.  
  446.           MAKE-SYMBOL         CSUBR       (X)
  447.  
  448.           Creates a new symbol,  which  is  not interned on the object
  449.           list, with a print-name of X. This function  returns the new
  450.           symbol. 
  451.  
  452.           
  453.  
  454.  
  455.  
  456.  
  457.  
  458.                                      - 141 -              Version 1.10
  459.           
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.           PDLISP language manual                    Character Strings
  467.           
  468.  
  469.  
  470.  
  471.  
  472.                        This page intentionally left blank
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.                                      - 142 -              Version 1.10
  525.           
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.           PDLISP language manual                    Character Strings
  533.           
  534.  
  535.  
  536.  
  537.  
  538.                        This page intentionally left blank
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.                                      - 143 -              Version 1.10
  591.           
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.           PDLISP language manual                    Character Strings
  599.           
  600.  
  601.  
  602.  
  603.  
  604.                        This page intentionally left blank
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620.  
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.  
  655.  
  656.                                      - 144 -              Version 1.10
  657.           
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.           PDLISP language manual                               Arrays
  665.           
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.                                    Chapter 11
  676.  
  677.                                      Arrays
  678.  
  679.  
  680.  
  681.           Arrays are not currently implemented in PDLISP,
  682.           but may be in the future. They will shortly (as
  683.           of August, 1986) be available in UNXLISP.
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713.  
  714.  
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.                                      - 145 -              Version 1.10
  723.           
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.           PDLISP language manual                               Arrays
  731.           
  732.  
  733.  
  734.  
  735.  
  736.                        This page intentionally left blank
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788.                                      - 146 -              Version 1.10
  789.           
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.           PDLISP language manual                               Arrays
  797.           
  798.  
  799.  
  800.  
  801.  
  802.                        This page intentionally left blank
  803.  
  804.  
  805.  
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.                                      - 147 -              Version 1.10
  855.           
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.           PDLISP language manual                               Arrays
  863.           
  864.  
  865.  
  866.  
  867.  
  868.                        This page intentionally left blank
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.                                      - 148 -              Version 1.10
  921.           
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.           PDLISP language manual                               Arrays
  929.           
  930.  
  931.  
  932.  
  933.  
  934.                        This page intentionally left blank
  935.  
  936.  
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.                                      - 149 -              Version 1.10
  987.           
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.           PDLISP language manual                               Arrays
  995.           
  996.  
  997.  
  998.  
  999.  
  1000.                        This page intentionally left blank
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.                                      - 150 -              Version 1.10
  1053.           
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.           PDLISP language manual                               Arrays
  1061.           
  1062.  
  1063.  
  1064.  
  1065.  
  1066.                        This page intentionally left blank
  1067.  
  1068.  
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.                                      - 151 -              Version 1.10
  1119.           
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.           PDLISP language manual       Arithmetic and Mathematical Functions
  1127.           
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.                                    Chapter 12
  1138.  
  1139.                       Arithmetic and Mathematical Functions
  1140.  
  1141.  
  1142.  
  1143.           This chapter describes the mathematical  functions which are
  1144.           provided  with PDLISP. Generic  functions  are  capable  of
  1145.           handling  any  combination  of  integers  or  floats;   type
  1146.           restrictions on other functions are noted. 
  1147.  
  1148.  
  1149.           DIV                 CSUBR       (X1 X2)
  1150.  
  1151.           Returns the remainder of X1/X2. X1 and X2 must both be integers,
  1152.           or an error results.
  1153.  
  1154.  
  1155.           %                   CSUBR       (X1 X2)
  1156.  
  1157.           Generic division function. X1 and X2 can be integers or floats,
  1158.           in any combination.
  1159.  
  1160.  
  1161.           FLOATP              CSUBR       (X)
  1162.  
  1163.           Returns T if X is a float; otherwise returns NIL.
  1164.  
  1165.  
  1166.           INTEGERP            CSUBR       (X)
  1167.  
  1168.           Returns T if X is an integer; otherwise returns NIL.
  1169.  
  1170.  
  1171.           >               CSUBR       (X1 X2)
  1172.  
  1173.           Generic greater-than function; works with any combination of
  1174.           integers and floats.
  1175.  
  1176.  
  1177.           >=              CSUBR       (X1 X2)
  1178.  
  1179.           Generic greater-than-or-equal-to function; works with any
  1180.           combination of integers and floats.
  1181.  
  1182.  
  1183.  
  1184.                                      - 152 -              Version 1.10
  1185.           
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.           PDLISP language manual       Arithmetic and Mathematical Functions
  1193.           
  1194.  
  1195.  
  1196.  
  1197.  
  1198.  
  1199.           <               CSUBR       (X1 X2)
  1200.  
  1201.           Generic arithmetic "less-than" predicate. Works with
  1202.           integers or floats.
  1203.  
  1204.  
  1205.           <=              CSUBR       (X1 X2)
  1206.  
  1207.           Generic arithmetic "less-than or equal to" predicate.
  1208.           Works with integers or floats.
  1209.  
  1210.  
  1211.           -               CSUBR       (X1 &OPTIONAL &REST X2)
  1212.  
  1213.           Generic subtraction and negation routine. When invoked
  1214.           with one argument, this function will return the negation
  1215.           of that argument. When applied to more than one argument,
  1216.           this function subtracts from the first argument all of
  1217.           the rest, and returns the result. For example,
  1218.           (- 3 3 4) => -4.
  1219.  
  1220.           Compatibility note: This function is compatible with
  1221.           the - function in ZetaLISP and Common LISP.
  1222.  
  1223.  
  1224.           MOD             CSUBR       (X1 X2)
  1225.  
  1226.           Returns X1 modulo X2. X1 and X2 must both be integers.
  1227.  
  1228.  
  1229.           NEQL            CSUBR       (X1 X2)
  1230.  
  1231.           Equivalent to (NOT (EQL X1 X2)).
  1232.  
  1233.  
  1234.           *               CSUBR       (X1 X2)
  1235.  
  1236.           Generic multiplication function. X1 and X2 can be any
  1237.           combination of integers or floats.
  1238.  
  1239.  
  1240.           +               CSUBR       (&REST X)
  1241.  
  1242.           Generic addition function. This function returns the sum
  1243.           of its arguments, which can be any combination of integers
  1244.           or floats.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.                                      - 153 -              Version 1.10
  1251.           
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.           PDLISP language manual       Arithmetic and Mathematical Functions
  1259.           
  1260.  
  1261.  
  1262.  
  1263.  
  1264.                        This page intentionally left blank
  1265.  
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.                                      - 154 -              Version 1.10
  1317.           
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.           PDLISP language manual       Arithmetic and Mathematical Functions
  1325.           
  1326.  
  1327.  
  1328.  
  1329.  
  1330.                        This page intentionally left blank
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.                                      - 155 -              Version 1.10
  1383.           
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.           PDLISP language manual                      Logic Functions
  1391.           
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.                                    Chapter 13
  1402.  
  1403.                                  Logic Functions
  1404.  
  1405.  
  1406.  
  1407.           This chapter describes the boolean logic functions which are
  1408.           supported by PDLISP.
  1409.  
  1410.  
  1411.           AND                 CSUBR       (X1 X2 ... Xn)
  1412.  
  1413.               This function is really a combination of a logic function
  1414.           and also a control function. AND evaluates each of its
  1415.           arguments in turn, until one of them evaluates to NIL or the
  1416.           end of the list is reached. If the end of the list is
  1417.           reached, then this function returns the value of the last
  1418.           argument; otherwise it returns NIL.
  1419.  
  1420.  
  1421.           NOT                 CSUBR       (X)
  1422.  
  1423.               NOT performs the same function as NULL, which is a list
  1424.           processing predicate. NOT is included to clarify those
  1425.           situations where a logic operation is being performed, as
  1426.           opposed to testing for the end of a list or some other
  1427.           situation where NIL is being used as a terminator or flag.
  1428.  
  1429.  
  1430.           OR                  CSUBR       (X1 X2 ... Xn)
  1431.  
  1432.               This function scans its parameter list from left to
  1433.           right, and returns the first non-NIL value which is detected.
  1434.           If all of its arguments are NIL, then a value of NIL is
  1435.           returned.
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.                                      - 156 -              Version 1.10
  1449.           
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.           PDLISP language manual                      Logic Functions
  1457.           
  1458.  
  1459.  
  1460.  
  1461.  
  1462.                        This page intentionally left blank
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472.  
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481.  
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488.  
  1489.  
  1490.  
  1491.  
  1492.  
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                                      - 157 -              Version 1.10
  1515.           
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.           PDLISP language manual                      Logic Functions
  1523.           
  1524.  
  1525.  
  1526.  
  1527.  
  1528.                        This page intentionally left blank
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.                                      - 158 -              Version 1.10
  1581.           
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.           PDLISP language manual                      Logic Functions
  1589.           
  1590.  
  1591.  
  1592.  
  1593.  
  1594.                        This page intentionally left blank
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600.  
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.                                      - 159 -              Version 1.10
  1647.           
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.           PDLISP language manual                      Logic Functions
  1655.           
  1656.  
  1657.  
  1658.  
  1659.  
  1660.                        This page intentionally left blank
  1661.  
  1662.           
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.  
  1711.  
  1712.                                      - 160 -              Version 1.10
  1713.           
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.           PDLISP language manual       LED, the PDLISP Structure Editor
  1721.           
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.                                    Chapter 14
  1732.  
  1733.                         LED, the PDLISP Structure Editor
  1734.  
  1735.  
  1736.  
  1737.           Although  many  LISP  programmers   utilize   text   editors
  1738.           exclusively,  some prefer "structure editors", which  enable
  1739.           direct manipulation of the s-expression pointer space.  LED,
  1740.           the structure editor provided  with  PDLISP, is intended to
  1741.           be a small tool  for  making  temporary  patches in function
  1742.           definitions and  data  structures.  Permanent changes should
  1743.           be  made in the text file  defining  the  function  or  data
  1744.           structure being altered. 
  1745.  
  1746.           
  1747.  
  1748.  
  1749.  
  1750.  
  1751.           14.1 Invoking and Exiting LED
  1752.  
  1753.  
  1754.           LED  can  be  invoked  using   any  of  the  following  four
  1755.           functions:
  1756.  
  1757.  
  1758.           LEDEQ               CNSUBR      (X)
  1759.           LEDVQ               CNSUBR      (X)
  1760.           LEDPQ               CNSUBR      (X)
  1761.           LEDFQ               CNSUBR      (X)
  1762.  
  1763.           None of these functions quote their argument.   LEDEQ is the
  1764.           most  general  function,  and  it  means "edit an  arbitrary
  1765.           expression."  LEDVQ edits the value cell of a symbol.  LEDPQ
  1766.           edits  the  property  list of a symbol, and LEDFQ edits  the
  1767.           function definition cell of a symbol. 
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.                                      - 161 -              Version 1.10
  1779.           
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.           PDLISP language manual       LED, the PDLISP Structure Editor
  1787.           
  1788.  
  1789.  
  1790.  
  1791.           To  edit  the function definition cell of FOO, where FOO  is
  1792.           defined as (LAMBDA (X) (+ X 2)), one could type:
  1793.  
  1794.  
  1795.           /USR/LOGIN->(ledfq foo)
  1796.           LED                      ;LED prints out its name.
  1797.           (LAMBDA (X) (+ X 2))     ;and then the expression to
  1798.                                    ;be edited.
  1799.           *                        ;LED's prompt.
  1800.  
  1801.             LED saves the original expression so that one can undo all
  1802.           of the changes which we have been made.   We can quit LED in
  1803.           two ways.  Typing  OK  causes  LED  to  terminate  with  any
  1804.           changes which may have been made intact.   Typing  Q  causes
  1805.           LED  to  terminate,  but  the  original  expression  is  not
  1806.           altered. 
  1807.  
  1808.           
  1809.  
  1810.  
  1811.  
  1812.  
  1813.           14.2 Getting Around
  1814.  
  1815.  
  1816.           LED maintains an internal data structure called the  thread.
  1817.           As  one  moves  around  inside the expression which is being
  1818.           editing, the thread keeps track of where LED  has been.  The
  1819.           subpart of the expression being edited is called the current
  1820.           expression. 
  1821.  
  1822.             After  every  command  has been executed, LED outputs  the
  1823.           current  expression,  and  then its own prompt ("*"),  which
  1824.           indicates that it is  ready for input.  When LED is invoked,
  1825.           the current expression is the same as  the entire expression
  1826.           being edited. 
  1827.  
  1828.             Entering a positive integer,  N,  at the prompt causes LED
  1829.           to descend one  level  into the current expression.  The Nth
  1830.           element  of  the current expression becomes the new  current
  1831.           expression.  For example,  if  the  current  expression were
  1832.           (A B C), then entering 2 at the prompt would  cause  LED  to
  1833.           make B the new current expression. 
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.                                      - 162 -              Version 1.10
  1845.           
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.           PDLISP language manual       LED, the PDLISP Structure Editor
  1853.           
  1854.  
  1855.  
  1856.  
  1857.           LED also takes negative numbers as arguments; it  interprets
  1858.           these to mean that you wish to change  to  the  nth  element
  1859.           from the end of the current expression.  For example, if the
  1860.           current expression were (A B C),  entering  -1 at the prompt
  1861.           would cause LED to make C the current expression. 
  1862.  
  1863.             Entering a 0 at the  prompt  pops  the  thread back up one
  1864.           level. 
  1865.  
  1866.             As  an  illustration   of  these  commands,  consider  the
  1867.           following dialogue:
  1868.  
  1869.  
  1870.           /USR/LOGIN->(ledeq (a b (c d) e))
  1871.           LED                     ;LED echoes its name.
  1872.           (A B (C D) E)           ;expression we're starting with.
  1873.           * 3                     ;select 3rd element.
  1874.           (C D)                   ;LED echoes it back.
  1875.           * -1                    ;select last element in current exp.
  1876.           D                       ;LED echoes it back.
  1877.           * 0                     ;popping the thread 1 level.
  1878.           (C D)                   ;new current expression
  1879.           * 0                     ;pop the thread again.
  1880.           (A B (C D) E)           ;we're back at the beginning.
  1881.  
  1882.  
  1883.  
  1884.  
  1885.           14.3 Making Mistakes
  1886.  
  1887.  
  1888.           If an error occurs during the  execution  of  a command, LED
  1889.           will echo back the  command,  followed  by  a  question mark
  1890.           ("?").  All errors are (or should) be trapped by LED in this
  1891.           manner. 
  1892.  
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.                                      - 163 -              Version 1.10
  1911.           
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.           PDLISP language manual       LED, the PDLISP Structure Editor
  1919.           
  1920.  
  1921.  
  1922.  
  1923.  
  1924.  
  1925.  
  1926.  
  1927.           14.4 Making Changes
  1928.  
  1929.  
  1930.           Changes  can be made in the current  expression  with  three
  1931.           fairly  simple commands: the  insert,  delete,  and  replace
  1932.           commands.  Here's how they work:
  1933.  
  1934.             To insert  something  into  the  current  expression, just
  1935.           enter a left parentheses,  the  letter  "I", the position in
  1936.           the list before which you want to  insert  the new item, the
  1937.           element  to  be  added,  and  a  closing  parenthesis.   For
  1938.           example,
  1939.  
  1940.  
  1941.           /USR/LOGIN->(ledeq (a b c))     ;invoke LED.
  1942.           LED
  1943.           (A B C)                         ;current expression.
  1944.           * (i 2 X)                       ;insert "X" before "B".
  1945.           (A X B C)                       ;
  1946.  
  1947.               To delete the "X", use the "D" command, as follows:
  1948.  
  1949.           * (d 2)                         ;delete the second element.
  1950.           (A B C)                         ;this is the result.
  1951.  
  1952.               One could replace the "B" by an "X" with the "R"
  1953.           command, as follows:
  1954.  
  1955.           * (r b x)
  1956.           (A X C)
  1957.  
  1958.           The replace command replaces  all  occurences  of its target
  1959.           pattern by the  new  pattern.  For example, in the following
  1960.           example, there is more than one occurence of the symbol "D":
  1961.  
  1962.  
  1963.           (A B (C D) E D)                 ;current expression.
  1964.           * (r d z)                       ;replace all D's by Z.
  1965.           (A B (C Z) E Z)
  1966.  
  1967.           In the above example, D's are replaced by Z's wherever  they
  1968.           appear  in  the  current  expression, and not  just  in  the
  1969.           top-most level of the current expression. 
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.                                      - 164 -              Version 1.10
  1977.           
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.           PDLISP language manual       LED, the PDLISP Structure Editor
  1985.           
  1986.  
  1987.  
  1988.  
  1989.  
  1990.  
  1991.  
  1992.  
  1993.           14.5 How LED prints out expressions
  1994.  
  1995.  
  1996.           When LED prints the current expression, it does so using the
  1997.           SPRINT  function, which is defined in the file misc.l, which
  1998.           is part of the  distribution.  Any components of the current
  1999.           expression  which  are  more  than  3  levels  deep  in  the
  2000.           structure  are  represented by an ampersand ("&"). LED  does
  2001.           this in order  to  compress  the output, and so that it does
  2002.           not "blow up" when it encounters a circular list. 
  2003.  
  2004.  
  2005.           /USR/LOGIN->(ledeq (a b (c d (e f (g h) i j))))
  2006.           LED
  2007.           (A B (C D (E F & I J)))   ;current expression.
  2008.           *                         ;LED's prompt.
  2009.  
  2010.           In  the  above  example,  the top-most level of the  current
  2011.           expression  contains 3 sub-expressions; the first one is  A,
  2012.           the second one is B, and the third one constitutes  the rest
  2013.           of the list.  If one wished to move to the third expression,
  2014.           one could enter the number "3", as follows:
  2015.  
  2016.  
  2017.           * 3
  2018.           (C D (E F (G H) I J))
  2019.           *
  2020.  
  2021.           In  this  case,  when  LED  prints  out  the   new   current
  2022.           expression,  it  no  longer  substitutes  "&"  for "(G  H)",
  2023.           because that subexpression is no longer  more  than 3 levels
  2024.           deep in the structure. 
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.                                      - 165 -              Version 1.10
  2043.           
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.           PDLISP language manual       LED, the PDLISP Structure Editor
  2051.           
  2052.  
  2053.  
  2054.  
  2055.  
  2056.  
  2057.  
  2058.  
  2059.           14.6 A Quick Summary of LED Commands
  2060.  
  2061.  
  2062.  
  2063.           n, where n is an integer:
  2064.  
  2065.               n > 0 ==> make the current expression
  2066.               the nth element of the current expression
  2067.  
  2068.               n < 0 ==> make the current expression
  2069.               the nth from the last element of the
  2070.               current expression. (i.e., -1 selects
  2071.               the last element, -2 the second from
  2072.               the last, etc.)
  2073.  
  2074.               n = 0 => pops the thread one level.
  2075.  
  2076.             ^ pops the thread all the way back to the top. 
  2077.  
  2078.             OK ends the edit and accepts the altered expression. 
  2079.  
  2080.             Q ends the edit with no changes. 
  2081.  
  2082.             E evaluates an expression and prints its value. 
  2083.  
  2084.             P prints the current expression. 
  2085.  
  2086.             PP pretty-prints the current expression
  2087.  
  2088.             COPY copies the entire thread to a safe place. 
  2089.  
  2090.             RESTORE restores the  thread  to the value which was saved
  2091.           by copy. 
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.  
  2104.  
  2105.  
  2106.  
  2107.  
  2108.                                      - 166 -              Version 1.10
  2109.           
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.           PDLISP language manual       LED, the PDLISP Structure Editor
  2117.           
  2118.  
  2119.  
  2120.  
  2121.           MARK sets a mark in the mark list.  The mark list is a trail
  2122.           of "knots" in the  thread,  which  are called marks. Through
  2123.           the MARK, <, and << commands one  can traverse this list.  <
  2124.           goes back 1 place in the mark list,  but  does  not  pop the
  2125.           mark list, and <<  goes  back  1 place in the mark list, and
  2126.           pops the mark list. 
  2127.  
  2128.             POFF turns off  the  print  flag, and PON turns it on.  If
  2129.           the print flag is on, then the current expression is printed
  2130.           out after each command  is executed.  Otherwise, the current
  2131.           expression is printed out.  LED  starts  out  with the print
  2132.           flag on. 
  2133.  
  2134.           
  2135.  
  2136.  
  2137.           14.6.1 Structure Modification Commands
  2138.  
  2139.           (N E), N >  1  replaces  the  Nth  element  of  the  current
  2140.           expression with E.
  2141.  
  2142.             (N E1 E2 ...  EM), N,M > 1 replaces the Nth element of the
  2143.           current expression with E1 E2 ... EM.
  2144.  
  2145.             (-N E), N >  1  inserts  E  before  the Nth element of the
  2146.           current  expression.    (-N E1 E2 ... EM), N,M > 1   inserts
  2147.           E1 ... EM before the Nth element of the current expression. 
  2148.  
  2149.             (R X Y) ("Replace")  replaces  all occurrences of X in the
  2150.           current expression by Y. The replacement is done  throughout
  2151.           the current expression, and not just at the top-most level. 
  2152.           For    example,    if   the    current    expression    were
  2153.           (LAMBDA (X Y) (+ X Y)), then typing (R Y Z) would change the
  2154.           current expression to (LAMBDA (X Z) (+ X Z)).
  2155.  
  2156.  
  2157.  
  2158.  
  2159.  
  2160.  
  2161.  
  2162.  
  2163.  
  2164.  
  2165.  
  2166.  
  2167.  
  2168.  
  2169.  
  2170.  
  2171.  
  2172.  
  2173.  
  2174.                                      - 167 -              Version 1.10
  2175.           
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.           PDLISP language manual       LED, the PDLISP Structure Editor
  2183.           
  2184.  
  2185.  
  2186.  
  2187.  
  2188.  
  2189.           14.6.2 Parenthesis Moving Commands
  2190.  
  2191.             (BI M N) ("Both In")  inserts  parenthesis  before the mth
  2192.           element  and  after  the   nth   element   of   the  current
  2193.           expression.   For example, if the  current  expression  were
  2194.           (A B C D E), then  executing  (BI 3 4)  would  change  it to
  2195.           (A B (C D) E).
  2196.  
  2197.             (BO N) ("Both Out") removes both parenthesis  from the NTH
  2198.           element of the current expression, and splices its  elements
  2199.           into the current expression.   For  example,  if the current
  2200.           expression were (A B (C D) E F), then executing (BO 3) would
  2201.           result in (A B C D E F).
  2202.  
  2203.             (LI N)  ("Left  In") inserts a left parenthesis before the
  2204.           Nth element,  and a matching right parenthesis at the end of
  2205.           the  current expression.  For example, if  (A B C D E)  were
  2206.           the current expression, then  executing  (LI 2) would result
  2207.           in (A (B C D E)).
  2208.  
  2209.             (LO N) ("Left Out") removes  a  left  parenthesis from the
  2210.           Nth  element  of  the  current  expression, and deletes  all
  2211.           elements after the Nth element.  For example, if the current
  2212.           expression were (A B (C D) E F), then executing (LO 3) would
  2213.           result in (A B C D).
  2214.  
  2215.             (RI M N) ("Right  In") moves the right paren at the end of
  2216.           the Mth element inward until it is after  the Nth element of
  2217.           the Mth element of the current expression.  The remainder of
  2218.           the  Mth element is elevated to the top-most  level  of  the
  2219.           current expression.  For example, if the current  expression
  2220.           were (A B (C D E) F G), then executing (RI 3 2) would change
  2221.           it to be (A B (C D) E F G).
  2222.  
  2223.             (RO  N) ("Right Out") moves the right parenthesis  at  the
  2224.           end  of  the  Nth element out to  the  end  of  the  current
  2225.           expression.  The  rest of the elements following the Nth one
  2226.           are moved inside of the Nth  element.   For  example, if the
  2227.           current  expression  were  (A B (C D) E F)   then  executing
  2228.           (RO 3) would change it to (A B (C D E F)).
  2229.  
  2230.             note - all of the above parenthesis moving  commands  take
  2231.           negative arguments, which are processed in the  same  way as
  2232.           simple numerical  commands.   That is, -1 refers to the last
  2233.           element of  the  current expression, -2 to the second to the
  2234.           last element, and so on. 
  2235.  
  2236.  
  2237.  
  2238.  
  2239.  
  2240.                                      - 168 -              Version 1.10
  2241.           
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.           PDLISP language manual       LED, the PDLISP Structure Editor
  2249.           
  2250.  
  2251.  
  2252.  
  2253.  
  2254.                        This page intentionally left blank
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.  
  2269.  
  2270.  
  2271.  
  2272.  
  2273.  
  2274.  
  2275.  
  2276.  
  2277.  
  2278.  
  2279.  
  2280.  
  2281.  
  2282.  
  2283.  
  2284.  
  2285.  
  2286.  
  2287.  
  2288.  
  2289.  
  2290.  
  2291.  
  2292.  
  2293.  
  2294.  
  2295.  
  2296.  
  2297.  
  2298.  
  2299.  
  2300.  
  2301.  
  2302.  
  2303.  
  2304.  
  2305.  
  2306.                                      - 169 -              Version 1.10
  2307.           
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.           PDLISP language manual       LED, the PDLISP Structure Editor
  2315.           
  2316.  
  2317.  
  2318.  
  2319.  
  2320.                        This page intentionally left blank
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.                                      - 170 -              Version 1.10
  2373.           
  2374.  
  2375.  
  2376.  
  2377.  
  2378.  
  2379.  
  2380.           PDLISP language manual       LED, the PDLISP Structure Editor
  2381.           
  2382.  
  2383.  
  2384.  
  2385.  
  2386.                        This page intentionally left blank
  2387.  
  2388.  
  2389.  
  2390.  
  2391.  
  2392.  
  2393.  
  2394.  
  2395.  
  2396.  
  2397.  
  2398.  
  2399.  
  2400.  
  2401.  
  2402.  
  2403.  
  2404.  
  2405.  
  2406.  
  2407.  
  2408.  
  2409.  
  2410.  
  2411.  
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.                                      - 171 -              Version 1.10
  2439.           
  2440.  
  2441.  
  2442.  
  2443.  
  2444.  
  2445.  
  2446.           PDLISP language manual          PDLISP Debugging Functions
  2447.           
  2448.  
  2449.  
  2450.  
  2451.  
  2452.  
  2453.  
  2454.  
  2455.  
  2456.  
  2457.                                    Chapter 15
  2458.  
  2459.                            PDLISP Debugging Functions
  2460.  
  2461.  
  2462.  
  2463.  
  2464.           15.1 The PDLISP Debugger
  2465.  
  2466.  
  2467.           15.1.1 A Bird's Eye View of the Stack
  2468.  
  2469.           If a bird could fly around  inside of a LISP interpreter, it
  2470.           would see something like the following diagram:
  2471.  
  2472.  
  2473.                    -------------
  2474.                   |  frame 1    |<--- top-level
  2475.                   +-------------+
  2476.                   |  frame 2    |
  2477.                   +-------------+
  2478.                   |  frame 3    |
  2479.                   +-------------+
  2480.                        ...
  2481.                   +-------------+
  2482.                   |   frame N   |<--- current frame
  2483.                   +-------------+
  2484.  
  2485.           The  above diagram is supposed to represent what  is  called
  2486.           the  evaluation  stack,  or  simply  the  stack.  The  stack
  2487.           consists of a sequence  of  frames.  Each frame corresponds,
  2488.           roughly speaking,  to  one  function  call  which  is in the
  2489.           process of being evaluated. 
  2490.  
  2491.             For example, if the  expression (foo (bar a b)) were to be
  2492.           evaluated,  then  two frames would be created: one  for  the
  2493.           function FOO,  and  another  for the function BAR. No frames
  2494.           are created when the  variables  A and B are evaluated; when
  2495.           the PDLISP evaluator was  implemented,  it  was  deemed too
  2496.           expensive to create a frame for each variable reference. 
  2497.  
  2498.  
  2499.  
  2500.  
  2501.  
  2502.  
  2503.  
  2504.                                      - 172 -              Version 1.10
  2505.           
  2506.  
  2507.  
  2508.  
  2509.  
  2510.  
  2511.  
  2512.           PDLISP language manual          PDLISP Debugging Functions
  2513.           
  2514.  
  2515.  
  2516.  
  2517.           The frame at the top of  the diagram is called the top-level
  2518.           frame.   It  corresponds to a function called the  top-level
  2519.           driver  which  is  the primary interaction loop in  PDLISP.
  2520.           This driver loop displays a prompt string, which is ususally
  2521.           the current directory followed by an "->"  sign.   Then,  it
  2522.           reads  an  s-expression from the console, evaluates it,  and
  2523.           prints  the result.  So, when you  see  a  prompt  like  the
  2524.           following one:
  2525.  
  2526.  
  2527.           /USR/LOGIN->
  2528.  
  2529.           you are interacting with the top-level driver. 
  2530.  
  2531.           
  2532.  
  2533.  
  2534.           15.1.2 DEBUG and DEBUGQ
  2535.  
  2536.           These two functions provide  access to the PDLISP debugging
  2537.           system.  Normally, when an error occurs, an error message is
  2538.           output on the console, and control  is  "thrown"  back up to
  2539.           the top-level  driver.   For example, if the variable A were
  2540.           unbound, then we might see the following interaction  taking
  2541.           place:
  2542.  
  2543.  
  2544.           /USR/LOGIN->(f a)
  2545.           (***> EVAL: variable A is UNBOUND.)
  2546.           /USR/LOGIN->
  2547.  
  2548.           But,  by  using  the   DEBUG  function,  the  state  of  the
  2549.           computation can  be "frozen" at the point at which the error
  2550.           occurs, as in the following:
  2551.  
  2552.  
  2553.           /USR/LOGIN->(debug '(f a))
  2554.           (***> EVAL: variable A is UNBOUND.)
  2555.           <1>: (return 1)
  2556.           1
  2557.  
  2558.           The DEBUGQ function is  identical  to  the  DEBUG  function,
  2559.           except that it quotes its argument.  So, instead of typing
  2560.  
  2561.  
  2562.           /USR/LOGIN->(debug '(f a))
  2563.  
  2564.           we could have typed:
  2565.  
  2566.           /USR/LOGIN->(debugq (f a))
  2567.  
  2568.  
  2569.  
  2570.                                      - 173 -              Version 1.10
  2571.           
  2572.  
  2573.  
  2574.  
  2575.  
  2576.  
  2577.  
  2578.           PDLISP language manual          PDLISP Debugging Functions
  2579.           
  2580.  
  2581.  
  2582.  
  2583.  
  2584.           When the debugger is being used, and the PDLISP interpreter
  2585.           detects  a mistake, it  outputs  a  special  prompt,  namely
  2586.           "<1>:". This means that  the  interpreter  is  in  a special
  2587.           mode, called the System Break Function, or just BREAK.
  2588.  
  2589.             In the above example, the interpreter halted evaluation of
  2590.           the expression (F A) because A had apparently  never  had  a
  2591.           value assigned to  it.   The programmer in the above example
  2592.           exited BREAK by entering  the  expression  (return 1). BREAK
  2593.           then took 1 to be the value of the entire expression. 
  2594.  
  2595.             After  evaluating  (RETURN 1), the  interpreter  continues
  2596.           evaluation of any pending s-expressions on the stack.  It is
  2597.           extremely important to notice that PDLISP  takes  "1" to be
  2598.           the  value  of  "(F A)",  and  not of just  the  variable  A
  2599.           itself. 
  2600.  
  2601.             The "1" inside of the angle  brackets  represents a number
  2602.           called the "system break level".  If we were to make another
  2603.           mistake while at the  "<1>"  prompt,  then  the  interpreter
  2604.           would  enter BREAK again, with an incremented break  level. 
  2605.           For example suppose that we blunder twice, as follows:
  2606.  
  2607.  
  2608.           /USR/LOGIN->(debugq (f b))        ;expression to be evaluated
  2609.           ***> EVAL: variable B is UNBOUND. ;unbound variable message
  2610.           <1>:(f a)                         ;suppose A is also unbound
  2611.           ***> EVAL: variable A is UNBOUND. ;unbound variable message
  2612.           <2>:(return 1)                    ;return 1 as value of (f a)
  2613.           3                                 ;result of (f a)
  2614.           <1>:(return 1)                    ;let's return 1
  2615.           1                                 ;as the value of (f b)
  2616.           /USR/LOGIN->                      ;back to top-level
  2617.  
  2618.           We  could  also  have  returned  directly  to the  top-level
  2619.           prompt, by using the RESET function as shown below:
  2620.  
  2621.  
  2622.           /USR/LOGIN->(debugq (f a))
  2623.           ***> EVAL: variable A is UNBOUND.   ;standard error message.
  2624.           <1>:(reset)
  2625.           /USR/LOGIN->                        ;back to top-level
  2626.  
  2627.  
  2628.  
  2629.  
  2630.  
  2631.  
  2632.  
  2633.  
  2634.  
  2635.  
  2636.                                      - 174 -              Version 1.10
  2637.           
  2638.  
  2639.  
  2640.  
  2641.  
  2642.  
  2643.  
  2644.           PDLISP language manual          PDLISP Debugging Functions
  2645.           
  2646.  
  2647.  
  2648.  
  2649.           Note that in the above example, we could be many levels deep
  2650.           into the break handler, and we  could still have gotten back
  2651.           to the top-level.  For example, if the "<1>:" were a "<4>:",
  2652.           we could still have gotten back  to  the  top-level  with  a
  2653.           (RESET).
  2654.  
  2655.           
  2656.  
  2657.  
  2658.  
  2659.  
  2660.           15.2 A Sample Debugging Session
  2661.  
  2662.  
  2663.           Before  examining  in detail all of the debugging  functions
  2664.           which are supplied  with PDLISP, let's go through a typical
  2665.           debugging session  to  see  how  it  is  all supposed to fit
  2666.           together. 
  2667.  
  2668.             First,  suppose  that  we  have written a function  called
  2669.           BLOWUP,  which  is  supposed to add two numbers together and
  2670.           return the result.  We could have defined BLOWUP as follows:
  2671.  
  2672.  
  2673.           /USR/LOGIN->(defun blowup (x y) (+ x y)) ;a 1-line function definition.
  2674.           BLOWUP                                   ;DEFUN returns name of function.
  2675.  
  2676.           Now, let's invoke BLOWUP on a test case:
  2677.  
  2678.           /USR/LOGIN->(debugq (blowup a 4))        ;suppose that A is not bound.
  2679.           (***> EVAL: variable A is UNBOUND.)      ;PDLISP outputs an error message
  2680.           <1>:                                     ; and goes into the break handler.
  2681.  
  2682.           At this point, we can examine the contents of the stack using
  2683.           the SHOWSTACK function, as follows:
  2684.  
  2685.           <1>:(showstack)
  2686.  
  2687.           (SHOWSTACK)
  2688.  
  2689.           <----------------------- frame ----------------------->
  2690.  
  2691.           ("***> EVAL: variable " A "is unbound.")
  2692.  
  2693.           <----------------------- frame ----------------------->
  2694.  
  2695.           (BLOWUP A 4)
  2696.  
  2697.           <----------------------- frame ----------------------->
  2698.  
  2699.  
  2700.  
  2701.  
  2702.                                      - 175 -              Version 1.10
  2703.           
  2704.  
  2705.  
  2706.  
  2707.  
  2708.  
  2709.  
  2710.           PDLISP language manual          PDLISP Debugging Functions
  2711.           
  2712.  
  2713.  
  2714.  
  2715.           (EVAL E)
  2716.  
  2717.           <----------------------- frame ----------------------->
  2718.  
  2719.           (SETQ RESULT (EVAL E))
  2720.  
  2721.           <----------------------- frame ----------------------->
  2722.  
  2723.           (PROGN
  2724.             (SETQ OLDERRLBL (STATUS ERROR_LABEL))
  2725.             (STATUS ERROR_LABEL NIL)
  2726.             (SETQ RESULT (EVAL E))
  2727.             (STATUS ERROR_LABEL OLDERRLBL)
  2728.             RESULT)
  2729.  
  2730.           <----------------------- frame ----------------------->
  2731.  
  2732.           ((PROGN
  2733.             (SETQ OLDERRLBL (STATUS ERROR_LABEL))
  2734.             (STATUS ERROR_LABEL NIL)
  2735.             (SETQ RESULT (EVAL E))
  2736.             (STATUS ERROR_LABEL OLDERRLBL)
  2737.             RESULT))
  2738.  
  2739.           <----------------------- frame ----------------------->
  2740.  
  2741.           (((PROGN
  2742.             (SETQ OLDERRLBL (STATUS ERROR_LABEL))
  2743.             (STATUS ERROR_LABEL NIL)
  2744.             (SETQ RESULT (EVAL E))
  2745.             (STATUS ERROR_LABEL OLDERRLBL)
  2746.             RESULT)))
  2747.  
  2748.           <----------------------- frame ----------------------->
  2749.  
  2750.           (BLOCK
  2751.             DEBUG
  2752.             ((PROGN
  2753.               (SETQ OLDERRLBL (STATUS ERROR_LABEL))
  2754.               (STATUS ERROR_LABEL NIL)
  2755.               (SETQ RESULT (EVAL E))
  2756.               (STATUS ERROR_LABEL OLDERRLBL)
  2757.               RESULT)))
  2758.  
  2759.           <----------------------- frame ----------------------->
  2760.  
  2761.           (DEBUG E)
  2762.  
  2763.           <----------------------- frame ----------------------->
  2764.  
  2765.  
  2766.  
  2767.  
  2768.                                      - 176 -              Version 1.10
  2769.           
  2770.  
  2771.  
  2772.  
  2773.  
  2774.  
  2775.  
  2776.           PDLISP language manual          PDLISP Debugging Functions
  2777.           
  2778.  
  2779.  
  2780.  
  2781.           (DEBUGQ (BLOWUP A 4))
  2782.  
  2783.           <----------------------- frame ----------------------->
  2784.  
  2785.           (EVAL E)
  2786.  
  2787.           <----------------------- frame ----------------------->
  2788.  
  2789.           (PRINT (EVAL E))
  2790.  
  2791.           <----------------------- frame ----------------------->
  2792.  
  2793.           (PROGN
  2794.             (OUTPROMPT) (SETQ E (READ)) (PRINT (EVAL E)))
  2795.  
  2796.           <----------------------- frame ----------------------->
  2797.  
  2798.           ((PROGN
  2799.             (OUTPROMPT) (SETQ E (READ)) (PRINT (EVAL E))))
  2800.  
  2801.           <----------------------- frame ----------------------->
  2802.  
  2803.           (CATCH
  2804.             ((QUOTE ?*TOPLEVEL*?) (QUOTE CONTROL_C_LABEL))
  2805.             (PROGN
  2806.               (OUTPROMPT) (SETQ E (READ)) (PRINT (EVAL E))))
  2807.           
  2808.           <----------------------- frame ----------------------->
  2809.  
  2810.           (TOPLEVEL)
  2811.  
  2812.           <----------------------- frame ----------------------->
  2813.           T (***> EVAL: variable _A is unbound.)
  2814.           <1>:
  2815.  
  2816.           Some explanation  of  the above output may be in order.  The
  2817.           first frame, (SHOWSTACK), pertains  to the invocation of the
  2818.           SHOWSTACK function, and has nothing at  all  to  do with the
  2819.           evaluation of BLOWUP.
  2820.  
  2821.             The  next  frame  constitutes the error message which  was
  2822.           output immediately before the break loop was entered.  There
  2823.           may be some extra  double  quote  marks  in this expression,
  2824.           because SHOWSTACK uses different print  functions  than  the
  2825.           PDLISP error handler. 
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.                                      - 177 -              Version 1.10
  2835.           
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.           PDLISP language manual          PDLISP Debugging Functions
  2843.           
  2844.  
  2845.  
  2846.  
  2847.           The following frame, (BLOWUP A 4), is  the  expression which
  2848.           caused the error to occur. 
  2849.  
  2850.             The next several frames,  (EVAL E)  up  to  and  including
  2851.           (DEBUGQ (BLOWUP A 4))  are  related  to  the  evaluation  of
  2852.           DEBUGQ.
  2853.  
  2854.             The  last  group  of  frames,  from  (EVAL E)  up  to  and
  2855.           including  (TOPLEVEL)  pertain  to  the  evaluation  of  the
  2856.           "top-level driver loop", which control interaction with  the
  2857.           interpreter at the "/USR/LOGIN->" prompt. 
  2858.  
  2859.             After  all  frames  have  been  output, the break  handler
  2860.           outputs T, which is the value of SHOWSTACK,  and outputs the
  2861.           original error message.  Then, another break prompt,  "<1>:"
  2862.           in this case, is  output, and the interpreter waits for more
  2863.           commands from the console. 
  2864.  
  2865.             Since only the first few frames  pertain to the evaluation
  2866.           of BLOWUP, the SHOWSTACK function takes an optional argument
  2867.           which specifies the  number  of  frames  to  print out.  For
  2868.           example, one could type  (SHOWSTACK 4),  and  only  4 frames
  2869.           would be printed out. 
  2870.  
  2871.             Other  debugging  functions are provided with PDLISP, and
  2872.           are detailed in the following section. 
  2873.  
  2874.  
  2875.  
  2876.  
  2877.  
  2878.  
  2879.  
  2880.  
  2881.  
  2882.  
  2883.  
  2884.  
  2885.  
  2886.  
  2887.  
  2888.  
  2889.  
  2890.  
  2891.  
  2892.  
  2893.  
  2894.  
  2895.  
  2896.  
  2897.  
  2898.  
  2899.  
  2900.                                      - 178 -              Version 1.10
  2901.           
  2902.  
  2903.  
  2904.  
  2905.  
  2906.  
  2907.  
  2908.           PDLISP language manual          PDLISP Debugging Functions
  2909.           
  2910.  
  2911.  
  2912.  
  2913.  
  2914.  
  2915.  
  2916.  
  2917.           15.3 Debugger Support Functions
  2918.  
  2919.  
  2920.  
  2921.           SHOWSTACK           LAMBDA      (&optional NFRAMES)
  2922.  
  2923.               Prints a display of the environment stack on the
  2924.           standard output (console). An s-expression
  2925.           corresponding to each frame on the stack is output on
  2926.           its own line. A frame is created whenever a
  2927.           lambda-binding transaction occurs. This could happen
  2928.           when:
  2929.  
  2930.               (1) A function is being applied to some (possibly empty)
  2931.                   argument list.
  2932.  
  2933.               (2) When a PROG has been entered, one frame each is created
  2934.                   for the BLOCK, LET, and TAGBODY forms which are produced
  2935.                   when the PROG macro is expanded.
  2936.  
  2937.               (3) Other macros, such as DO and DO*, also expand into combinations
  2938.                   of BLOCK, LET, and TAGBODY forms. Consult their source code
  2939.                   for more precise details.
  2940.  
  2941.           The s-expression corresponding to  the  most recent frame is
  2942.           output  first,  and  the top-most  expression  (which  would
  2943.           normally be part of the top-level driver) is output last. 
  2944.  
  2945.             If the optional parameter NFRAMES is specified, then  only
  2946.           that number of frames  back from the current one are printed
  2947.           out.   Otherwise,  the entire  contents  of  the  stack  are
  2948.           printed out back to the top-level driver. 
  2949.  
  2950.  
  2951.  
  2952.  
  2953.  
  2954.  
  2955.  
  2956.  
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.                                      - 179 -              Version 1.10
  2967.           
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.           PDLISP language manual          PDLISP Debugging Functions
  2975.           
  2976.  
  2977.  
  2978.  
  2979.  
  2980.  
  2981.           BAKTRACE            NLAMBDA     (&OPTIONAL NFRAMES)
  2982.  
  2983.           This  function  is  similar  to SHOWSTACK, except that  only
  2984.           minimal information is  shown  about each frame.  The CAR of
  2985.           the  form being evaluated in each  frame  on  the  stack  is
  2986.           examined.  If it is atomic it is printed out.  Otherwise the
  2987.           CAAR of the form corresponding to the frame is printed out. 
  2988.           This usually  results  in  the name of the function which is
  2989.           being applied to some argument(s) being printed out. 
  2990.  
  2991.             The optional parameter NFRAMES is similar to the parameter
  2992.           of the same name when supplied to SHOWSTACK.
  2993.  
  2994.           
  2995.  
  2996.  
  2997.           BAKTRCE             CSUBR       (MODE)
  2998.  
  2999.           This function is a low-level function designed to facilitate
  3000.           the  implementation  of debugging tools.  It returns a  list
  3001.           corresponding   to   the  environment  stack.   The   actual
  3002.           information in the list  depends  on  MODE, which must be an
  3003.           integer. 
  3004.  
  3005.             If  MODE  is  0,  then  a  partial  display  is  produced,
  3006.           consisting of a list of forms.  Each form corresponds to the
  3007.           expression being evaluated at  a  corresponding frame on the
  3008.           environment stack. 
  3009.  
  3010.             If MODE is 1,  then a full display is produced, consisting
  3011.           of  a list of sublists.  Each sublist is  of  the  following
  3012.           format:
  3013.  
  3014.  
  3015.             (form frametype framenumber numargs returnable label l-list)
  3016.             where each item has the following meaning:
  3017.  
  3018.             form        -   the form being evaluated
  3019.  
  3020.             frametype   -   type of frame, represented as an integer.
  3021.                             the values are:
  3022.                                 1 - created by EVAL
  3023.                                 2 - created by BREAK
  3024.                                 3 - created by TAGBODY
  3025.                                 4 - created by CATCH
  3026.                                 5 - created by the macro expander
  3027.                                 6 - created by BLOCK
  3028.                                 7 - created by LET or LET*
  3029.  
  3030.  
  3031.  
  3032.                                      - 180 -              Version 1.10
  3033.           
  3034.  
  3035.  
  3036.  
  3037.  
  3038.  
  3039.  
  3040.           PDLISP language manual          PDLISP Debugging Functions
  3041.           
  3042.  
  3043.  
  3044.  
  3045.  
  3046.             framenumber -   a unique integer identifying the frame.
  3047.  
  3048.             returnable  -   T indicates that the computation can be
  3049.                             restarted with this frame by calling
  3050.                             UNWIND. NIL indicates that this cannot
  3051.                             be done.
  3052.  
  3053.             label       -   catch label if this frame was
  3054.                             a catch frame, otherwise NIL.
  3055.  
  3056.             numargs     -   integer which is the number of arguments
  3057.                             (actual parameters) which were passed if
  3058.                             the frame was a funcall, otherwise 0
  3059.  
  3060.             l-list      -   list of lambda-variables, if there
  3061.                             are any, otherwise NIL.
  3062.  
  3063.  
  3064.           DEBUG               NLAMBDA         (X)
  3065.  
  3066.           Sets up a debugging environment (see DEBUGSET), evaluates X,
  3067.           restores the environment to its original state, and  returns
  3068.           the result of evaluating X.
  3069.  
  3070.           
  3071.  
  3072.  
  3073.           DEBUGQ              LAMBDA          (X)
  3074.  
  3075.           Similar to DEBUG, except that it quotes its argument. 
  3076.  
  3077.           
  3078.  
  3079.  
  3080.           DEBUGSET            NLAMBDA         (X)
  3081.  
  3082.           Sets up  the  environment  to  be  either  a  debugging or a
  3083.           non-debugging environment, depending on the value of X. If X
  3084.           is  NIL,  then  a  non-debugging  environment  is  set   up;
  3085.           otherwise,  a  debugging  environment   is  set  up.   In  a
  3086.           debugging  environment,  internal  errors  (such  as   those
  3087.           generated by system primitives) generate a call to the break
  3088.           handler, which may be either the system break  handler  or a
  3089.           user-specified    break   handler.    In   a   non-debugging
  3090.           environment, internally generated errors cause control to be
  3091.           THROWN back  to  the top-level driver.  Also, the smash hook
  3092.           is set to NIL in a  debugging  environment,  so  that macros
  3093.           will  appear unexpanded in a back-trace.  PDLISP is set  up
  3094.           so   that,   as   delivered,  it  is  not  in  a   debugging
  3095.  
  3096.  
  3097.  
  3098.                                      - 181 -              Version 1.10
  3099.           
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.           PDLISP language manual          PDLISP Debugging Functions
  3107.           
  3108.  
  3109.  
  3110.  
  3111.           environment.  See  DEBUG, DEBUGQ, RESET, ERR, ERRSET, CATCH,
  3112.           and THROW.
  3113.  
  3114.           
  3115.  
  3116.  
  3117.           RESET               NLAMBDA     (&OPTIONAL (E NIL))
  3118.  
  3119.           Throws control back to the  top-level  driver  loop,  if one
  3120.           exists.  Optionally, the parameter E can be specified as the
  3121.           value to be thrown.  Otherwise, a value of NIL is thrown. 
  3122.  
  3123.           
  3124.  
  3125.  
  3126.           15.3.1 TRACE and UNTRACE
  3127.  
  3128.  
  3129.           TRACE               NLAMBDA     (&REST FNLIST)
  3130.           UNTRACE             NLAMBDA     (&REST FNLIST)
  3131.  
  3132.           TRACE and UNTRACE provide a way of selectively  viewing  the
  3133.           activity of functions as they are entered  and  exited.  For
  3134.           example,  suppose  that  we have defined a function  FOO  as
  3135.           follows:
  3136.  
  3137.  
  3138.           (defun foo (x y)
  3139.               (+ x y))
  3140.  
  3141.               Then, after tracing FOO by entering (TRACE FOO) and
  3142.           invoking it, we would see:
  3143.  
  3144.           /USR/LOGIN->(foo 2 3)
  3145.  
  3146.           entering FOO 2 3
  3147.           exiting FOO 5
  3148.  
  3149.               A more interesting demonstration involves RFIB, which
  3150.           is provided in the PDLISP distribution in the file named
  3151.           "examples.l".
  3152.  
  3153.           /USR/LOGIN->(loadv "examples.l")
  3154.           _RFIB
  3155.           _IPOWER
  3156.           _DO_IPOWER
  3157.           _IFACT
  3158.           _RFACT
  3159.           _REV
  3160.           _APP
  3161.  
  3162.  
  3163.  
  3164.                                      - 182 -              Version 1.10
  3165.           
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.           PDLISP language manual          PDLISP Debugging Functions
  3173.           
  3174.  
  3175.  
  3176.  
  3177.           T
  3178.  
  3179.           /USR/LOGIN->(trace rfib)      ;tracing rfib.
  3180.           (T)
  3181.           /USR/LOGIN->(rfib 3)          ;invoke rfib.
  3182.           entering _rfib (3)            ;arguments are in parenthesis.
  3183.             entering _rfib (2)
  3184.               entering _rfib (1)
  3185.               exiting _rfib 1           ;results are not in parenthesis.
  3186.               entering _rfib (0)
  3187.               exiting _rfib 1
  3188.             exiting _rfib 2
  3189.             entering _rfib (1)
  3190.             exiting _rfib 1
  3191.           exiting _rfib 3
  3192.           3                             ;final result
  3193.  
  3194.           In  the  above example, the amount of indentation  indicates
  3195.           how many times RFIB has called  itself.  Each time that RFIB
  3196.           is entered,  the  amount  of  indentation  is increased by 2
  3197.           spaces.   Likewise,  each  time  that  RFIB  is exited,  the
  3198.           indentation is decreased by 2 spaces. 
  3199.  
  3200.             We can also trace multiple functions at once by specifying
  3201.           them all at once to TRACE. For example,
  3202.  
  3203.  
  3204.           /USR/LOGIN->(trace foo bar baz)
  3205.           (T T T)
  3206.  
  3207.           would  trace  the  functions  named  FOO,  BAR, and BAZ. The
  3208.           result  returned  by  TRACE  is  a  list  of  T's and  NIL's
  3209.           reflecting the success (or failure) of the tracing operation
  3210.           for each argument. 
  3211.  
  3212.             UNTRACE  takes  a  list  of  symbols  to be untraced,  and
  3213.           returns T or NIL for each argument to  indicate  success  or
  3214.           failure.   For  example, if FOO and BAR had previously  been
  3215.           traced, and BAZ had not, then we would have:
  3216.  
  3217.  
  3218.           /USR/LOGIN->(untrace foo bar baz)
  3219.           (T T NIL)
  3220.  
  3221.           TRACE and UNTRACE will be brought up to the full Common LISP
  3222.           specification in a future release, and a STEP  function will
  3223.           also be released. 
  3224.  
  3225.           
  3226.  
  3227.  
  3228.  
  3229.  
  3230.                                      - 183 -              Version 1.10
  3231.           
  3232.  
  3233.  
  3234.  
  3235.  
  3236.  
  3237.  
  3238.           PDLISP language manual          PDLISP Debugging Functions
  3239.           
  3240.  
  3241.  
  3242.  
  3243.  
  3244.  
  3245.  
  3246.  
  3247.           15.4 System Hooks and the STATUS Function
  3248.  
  3249.  
  3250.  
  3251.               Hooks are a way of communicating with the interpreter about
  3252.           low-level behavior. A general explanation of the hook functions
  3253.           available in PDLISP is presented in this section.
  3254.  
  3255.           STATUS              CSUBR       (X &OPTIONAL Y)
  3256.  
  3257.             This is a generalized system status routine which
  3258.           allows system "hooks" and constants to be examined and
  3259.           set. STATUS behaves  in two different modes, depending
  3260.           upon the number of arguments which are passed to it. The
  3261.           first argument, which is required, must be an integer.
  3262.           This argument is associated with some system hook or
  3263.           constant. The second argument, which is optional, can be
  3264.           any symbolic expression.
  3265.  
  3266.             If one argument is passed to it, then STATUS returns
  3267.           the value of an associated system hook or constant.  For
  3268.           example, (STATUS 400) returns the current value of the
  3269.           reader search path.
  3270.  
  3271.             If two arguments are passed to STATUS, then the second
  3272.           argument is assumed to be the new value of the system
  3273.           hook or function which is associated with the first argument.
  3274.  
  3275.             For convenience, a group of variables have been defined as
  3276.           integers in SYS/CONST to allow the usage of STATUS on a
  3277.           mnemonic basis. These variables, their corresponding integer
  3278.           values, and explanations of their meanings are given below:
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292.  
  3293.  
  3294.  
  3295.  
  3296.                                      - 184 -              Version 1.10
  3297.           
  3298.  
  3299.  
  3300.  
  3301.  
  3302.  
  3303.  
  3304.           PDLISP language manual          PDLISP Debugging Functions
  3305.           
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.           15.4.1 The Top-Level Hook
  3312.  
  3313.  
  3314.           /SYS/CONST/TOP_LEVEL_HOOK           value of variable = 0
  3315.  
  3316.               The top-level hook has been provided so that the user
  3317.           can customize the outermost level of interaction of the
  3318.           interpreter. Usually, this consists of a "read-eval-print"
  3319.           loop, but other configurations are possible. A sample
  3320.           top-level function is defined in dirlib.l.
  3321.  
  3322.             (STATUS TOP_LEVEL_HOOK VALUE) sets the top-level function
  3323.           hook to VALUE. From then on, this user-defined function
  3324.           is used instead of the built-in read-eval-print loop.
  3325.  
  3326.             (STATUS TOP_LEVEL_HOOK) returns the current value of the
  3327.           top-level hook
  3328.  
  3329.  
  3330.           15.4.2 The Pretty-Printer Hook
  3331.  
  3332.  
  3333.           /SYS/CONST/PP_HOOK                  value of variable = 1
  3334.  
  3335.           The pretty-printer hook has been provided so that the
  3336.           user can specify that all output is to be formatted. As
  3337.           delivered, this hook is set to NIL, so that output is
  3338.           formatted only when one of the pretty-printing functions
  3339.           (PP, PPDEF) has been called. See also the descriptions of
  3340.           the functions PP, PPDEF, and UNPRINT.
  3341.  
  3342.             (STATUS PP_HOOK X) sets the system pretty-printer hook
  3343.           to X. If this hook is non-NIL, then the user-specified
  3344.           function is called by PDLISP every time that it outputs
  3345.           an s-expression to the screen.
  3346.  
  3347.             (STATUS PP_HOOK) returns the current contents of the
  3348.           pretty-printer hook.
  3349.  
  3350.  
  3351.  
  3352.  
  3353.  
  3354.  
  3355.  
  3356.  
  3357.  
  3358.  
  3359.  
  3360.  
  3361.  
  3362.                                      - 185 -              Version 1.10
  3363.           
  3364.  
  3365.  
  3366.  
  3367.  
  3368.  
  3369.  
  3370.           PDLISP language manual          PDLISP Debugging Functions
  3371.           
  3372.  
  3373.  
  3374.  
  3375.  
  3376.  
  3377.           15.4.3 The Smash Hook
  3378.  
  3379.  
  3380.           /SYS/CONST/SMASH_HOOK               value of variable = 2
  3381.  
  3382.             (STATUS SMASH_HOOK X) sets the value of the smash hook
  3383.           to X. If X is non-NIL, then all macros are assumed to be
  3384.           displacing macros. Setting the smash hook to NIL resets the
  3385.           system so that macros are not displacing. As delivered,
  3386.           the smash flag is set to T, in order to speed up execution.
  3387.           The smash flag is turned off inside of the debugger so as
  3388.           to facilitate back-tracing.
  3389.  
  3390.             (STATUS SMASH_HOOK) returns the current contents of the
  3391.           smash hook.
  3392.  
  3393.  
  3394.  
  3395.           15.4.4 The Break Hook
  3396.  
  3397.  
  3398.           /SYS/CONST/BREAK_HOOK               value of variable = 3
  3399.  
  3400.               This hook has been provided so that the user can
  3401.           specify a custom function to be invoked when an error is
  3402.           detected by the interpreter. As delivered, the break hook
  3403.           is initialized to NIL, so that whenever the system needs to
  3404.           invoke a break handler, it calls the default one which is
  3405.           hard-coded inside of the interpreter.
  3406.  
  3407.               (STATUS BREAK_HOOK) returns the current contents of the
  3408.           break hook.
  3409.  
  3410.           The hook is set by entering (STATUS BREAK_HOOK <hook-fn>),
  3411.           where  <hook-fn> is some s-expression which evaluates to
  3412.           the name of the function which is to be the new break
  3413.           handler. For example, (STATUS BREAK_HOOK 'FOO) sets the
  3414.           break hook to be the function FOO.
  3415.  
  3416.  
  3417.  
  3418.  
  3419.  
  3420.  
  3421.  
  3422.  
  3423.  
  3424.  
  3425.  
  3426.  
  3427.  
  3428.                                      - 186 -              Version 1.10
  3429.           
  3430.  
  3431.  
  3432.  
  3433.  
  3434.  
  3435.  
  3436.           PDLISP language manual          PDLISP Debugging Functions
  3437.           
  3438.  
  3439.  
  3440.  
  3441.  
  3442.  
  3443.           15.4.5 The Evaluatator Hook
  3444.  
  3445.  
  3446.           /SYS/CONST/EVAL_HOOK                value of variable = 4
  3447.  
  3448.             (STATUS EVAL_HOOK VALUE) sets the evaluator hook to VALUE.
  3449.           This hook is examined by EVAL each time that it is entered;
  3450.           if the hook is set to a non-NIL value, then this value is
  3451.           taken to be a user-defined evaluator function. The
  3452.           evaluator hook is then set to NIL, and the user-defined
  3453.           hook function is applied to the current argument list of
  3454.           EVAL. EVAL returns as its value whatever the hook function
  3455.           returned. The PDLISP Debugger uses this function to
  3456.           "single step" through an evaluation.
  3457.  
  3458.             (STATUS EVAL_HOOK) returns the current contents of the
  3459.           evaluator hook.
  3460.  
  3461.  
  3462.           15.4.6 The Full Path Flag
  3463.  
  3464.  
  3465.           /SYS/CONST/FULL_PATH_FLAG           value of variable = 5
  3466.  
  3467.             (STATUS FULL_PATH_FLAG VALUE) sets the full-path flag
  3468.           to VALUE, and (STATUS FULL_PATH_FLAG) returns its current
  3469.           value. The full path flag regulates the output of symbol
  3470.           names. If this flag is non-NIL, then the full path-name of
  3471.           every symbol is always output; otherwise, only the last
  3472.           segment of symbol names is output.
  3473.  
  3474.  
  3475.           15.4.7 The Directory Prefix Flag
  3476.  
  3477.  
  3478.           /SYS/CONST/DIR_PREFIX_FLAG          value of variable = 6
  3479.  
  3480.           (STATUS DIR_PREFIX_FLAG VALUE) sets the underscore prefix
  3481.           flag to VALUE, and (STATUS DIR_PREFIX_FLAG) returns its
  3482.           current value. Setting this hook to a non-NIL value causes
  3483.           the PDLISP kernel to print out all symbols which are in
  3484.           the current directory with a leading underscore. Setting
  3485.           the flag to NIL causes PDLISP to print all symbols without
  3486.           the underscore.
  3487.  
  3488.  
  3489.  
  3490.  
  3491.  
  3492.  
  3493.  
  3494.                                      - 187 -              Version 1.10
  3495.           
  3496.  
  3497.  
  3498.  
  3499.  
  3500.  
  3501.  
  3502.           PDLISP language manual          PDLISP Debugging Functions
  3503.           
  3504.  
  3505.  
  3506.  
  3507.  
  3508.  
  3509.           15.4.8 The Error Hook
  3510.  
  3511.           
  3512.           /SYS/CONST/ERROR_HOOK               value of variable = 7
  3513.           
  3514.  
  3515.               (STATUS ERROR_HOOK VALUE) sets the error handler hook
  3516.           to VALUE. The error hook is the function which is invoked
  3517.           when errors which do not require a break loop are to
  3518.           output their messages. As delivered, this hook is set to
  3519.           NIL, and error messages are output starting at the
  3520.           present position of the cursor. Using this function, one
  3521.           could output error messages in a "status line", or in
  3522.           some particular window.
  3523.  
  3524.             (STATUS ERROR_HOOK) returns the current value of this
  3525.           hook.
  3526.  
  3527.  
  3528.           15.4.9 The Garbage Collector Verbosity Flag
  3529.  
  3530.  
  3531.           /SYS/CONST/GC_VERBOSITY             value of variable = 8
  3532.  
  3533.           (STATUS GC_VERBOSITY VALUE) sets the garbage collector
  3534.           verbosity flag to VALUE. A VALUE of NIL indicates that the
  3535.           mark and sweep collector is silent, whereas a non-NIL VALUE
  3536.           causes the system to ring the bell every time that the
  3537.           collector is activated. This function returns VALUE as its
  3538.           value.
  3539.  
  3540.             (STATUS GC_VERBOSITY) returns the current contents of
  3541.           this hook.
  3542.  
  3543.  
  3544.  
  3545.  
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551.  
  3552.  
  3553.  
  3554.  
  3555.  
  3556.  
  3557.  
  3558.  
  3559.  
  3560.                                      - 188 -              Version 1.10
  3561.           
  3562.  
  3563.  
  3564.  
  3565.  
  3566.  
  3567.  
  3568.           PDLISP language manual          PDLISP Debugging Functions
  3569.           
  3570.  
  3571.  
  3572.  
  3573.  
  3574.  
  3575.           15.4.10 The Back-Quote Hook
  3576.  
  3577.  
  3578.           /SYS/CONST/BACK_QUOTE_HOOK          value of variable = 10
  3579.  
  3580.  
  3581.             The reader expands any expression it sees of the form
  3582.           `<exp> to (<back_quote_hook> <exp>), where <back_quote_hook>
  3583.           is the current value of the back-quote hook. PDLISP
  3584.           initializes this hook on boot-up from code in bakquote.l.
  3585.  
  3586.             (STATUS BACK_QUOTE_HOOK VALUE) sets this hook to VALUE.
  3587.           (STATUS BACK_QUOTE_HOOK) returns its current value.
  3588.  
  3589.  
  3590.           15.4.11 The Comma Hook
  3591.  
  3592.  
  3593.           /SYS/CONST/COMMA_HOOK               value of variable = 11
  3594.  
  3595.  
  3596.             The reader expands any expression it sees of the form
  3597.           ,<exp> to (<comma_hook> <exp>). PDLISP initializes this
  3598.           hook on boot-up from code in bakquote.l.
  3599.  
  3600.             (STATUS COMMA_HOOK VALUE) sets this hook to VALUE.
  3601.           (STATUS COMMA_HOOK) returns the current contents of
  3602.           this hook.
  3603.  
  3604.  
  3605.  
  3606.  
  3607.  
  3608.  
  3609.  
  3610.  
  3611.  
  3612.  
  3613.  
  3614.  
  3615.  
  3616.  
  3617.  
  3618.  
  3619.  
  3620.  
  3621.  
  3622.  
  3623.  
  3624.  
  3625.  
  3626.                                      - 189 -              Version 1.10
  3627.           
  3628.  
  3629.  
  3630.  
  3631.  
  3632.  
  3633.  
  3634.           PDLISP language manual          PDLISP Debugging Functions
  3635.           
  3636.  
  3637.  
  3638.  
  3639.  
  3640.  
  3641.           15.4.12 The Comma-At Hook
  3642.  
  3643.  
  3644.           /SYS/CONST/COMMA_AT_HOOK            value of variable = 12
  3645.  
  3646.  
  3647.             The reader expands any expression it sees of the form
  3648.           ,@<exp> to (<comma_at_hook> <exp>). PDLISP initializes
  3649.           this hook on boot-up from code in bakquote.l.
  3650.  
  3651.             (STATUS COMMA_AT_HOOK VALUE) sets this hook to VALUE.
  3652.           (STATUS COMMA_AT_HOOK) returns the current value of this
  3653.           hook.
  3654.  
  3655.  
  3656.           15.4.13 The Error Label Hook
  3657.  
  3658.  
  3659.           /SYS/CONST/ERROR_LABEL              value of variable = 13
  3660.  
  3661.  
  3662.               (STATUS ERROR_LABEL VALUE) sets the error label to
  3663.           VALUE. VALUE must be an interned symbol. This feature
  3664.           controls what happens when the PDLISP system break handler
  3665.           is called, and the user has not defined a user-break
  3666.           handler. If the error label is set to a non-NIL value, then
  3667.           the PDLISP kernel attempts a (THROW ERROR_LABEL MESSAGE),
  3668.           where MESSAGE is an error message.
  3669.  
  3670.             (STATUS ERROR_LABEL) returns the current contents of
  3671.           this hook.
  3672.  
  3673.  
  3674.  
  3675.  
  3676.  
  3677.  
  3678.  
  3679.  
  3680.  
  3681.  
  3682.  
  3683.  
  3684.  
  3685.  
  3686.  
  3687.  
  3688.  
  3689.  
  3690.  
  3691.  
  3692.                                      - 190 -              Version 1.10
  3693.           
  3694.  
  3695.  
  3696.  
  3697.  
  3698.  
  3699.  
  3700.           PDLISP language manual          PDLISP Debugging Functions
  3701.           
  3702.  
  3703.  
  3704.  
  3705.  
  3706.  
  3707.           15.4.14 The Parenthesis Counting Flag
  3708.  
  3709.  
  3710.           /SYS/CONST/PCOUNT_FLAG              value of variable = 14
  3711.  
  3712.  
  3713.             (STATUS PCOUNT_FLAG VALUE) sets the parenthesis counting
  3714.           flag to VALUE. If this flag is non-NIL, then parenthesis
  3715.           counting is done whenever an s-expression is read from
  3716.           the console. Whenever the reader is waiting for input,
  3717.           and the current expression being read would require
  3718.           1 or more right-parenthesis in order to be completed,
  3719.           a line of the form:
  3720.  
  3721.           N ->
  3722.  
  3723.           will be output. The number N refers to the number of
  3724.           unmatched left parenthesis in the expression being entered.
  3725.           This flag is set to T upon boot-up, as a result of an
  3726.           STATUS call in dirlib.l.
  3727.  
  3728.             (STATUS PCOUNT_FLAG) returns the current contents
  3729.           of this hook.
  3730.  
  3731.  
  3732.           15.4.15 The Current Directory Hook
  3733.  
  3734.  
  3735.           /SYS/CONST/CURRENT_DIR              value of variable = 100
  3736.  
  3737.  
  3738.               (STATUS CURRENT_DIR) returns the current directory.
  3739.           (STATUS CURRENT_DIR X) sets the current directory to X.
  3740.           More convenient functions for setting the current directory
  3741.           are CD, CDQ, MCD, MCDQ, PD, PDQ, and POPD.
  3742.  
  3743.  
  3744.  
  3745.  
  3746.  
  3747.  
  3748.  
  3749.  
  3750.  
  3751.  
  3752.  
  3753.  
  3754.  
  3755.  
  3756.  
  3757.  
  3758.                                      - 191 -              Version 1.10
  3759.           
  3760.  
  3761.  
  3762.  
  3763.  
  3764.  
  3765.  
  3766.           PDLISP language manual          PDLISP Debugging Functions
  3767.           
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.           15.4.16 The Break Level Hook
  3774.  
  3775.  
  3776.           /SYS/CONST/BREAK_LEVEL              value of variable = 200
  3777.  
  3778.  
  3779.               (STATUS BREAK_LEVEL X) sets the break level to X, where
  3780.           X is an integer. The break level is output as part of the
  3781.           system break handler prompt. For example, if the break
  3782.           level was 4, then the system break handler would output
  3783.           "<4>:" as its prompt. The break level is incremented every
  3784.           time that another error occurs, and is decremented whenever
  3785.           the break handler is exited.
  3786.  
  3787.             (STATUS BREAK_LEVEL) returns the current break level
  3788.           as an integer.
  3789.  
  3790.  
  3791.  
  3792.  
  3793.  
  3794.  
  3795.  
  3796.  
  3797.  
  3798.  
  3799.  
  3800.  
  3801.  
  3802.  
  3803.  
  3804.  
  3805.  
  3806.  
  3807.  
  3808.  
  3809.  
  3810.  
  3811.  
  3812.  
  3813.  
  3814.  
  3815.  
  3816.  
  3817.  
  3818.  
  3819.  
  3820.  
  3821.  
  3822.  
  3823.  
  3824.                                      - 192 -              Version 1.10
  3825.           
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.           PDLISP language manual          PDLISP Debugging Functions
  3833.           
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.           15.4.17 The X-Position Hook
  3840.  
  3841.  
  3842.           /SYS/CONST/X_POSITION               value of variable = 201
  3843.  
  3844.  
  3845.               (STATUS X_POSITION) returns the current x-coordinate of
  3846.           the cursor on the system console; when windows are implemented,
  3847.           this system will be extended to be usable on any interactive
  3848.           stream. The coordinate system assumes (0,0) to correspond
  3849.           to the extreme upper left of the screen;
  3850.  
  3851.  
  3852.  
  3853.           15.4.18 The Y-Position Hook
  3854.  
  3855.  
  3856.           /SYS/CONST/Y_POSITION               value of variable = 202
  3857.  
  3858.  
  3859.               (STATUS Y_POSITION) returns the current y-coordinate of
  3860.           the cursor on the system console; when windows are implemented,
  3861.           this system will be extended to be usable on any interactive
  3862.           stream.
  3863.  
  3864.  
  3865.  
  3866.  
  3867.  
  3868.  
  3869.  
  3870.  
  3871.  
  3872.  
  3873.  
  3874.  
  3875.  
  3876.  
  3877.  
  3878.  
  3879.  
  3880.  
  3881.  
  3882.  
  3883.  
  3884.  
  3885.  
  3886.  
  3887.  
  3888.  
  3889.  
  3890.                                      - 193 -              Version 1.10
  3891.           
  3892.  
  3893.  
  3894.  
  3895.  
  3896.  
  3897.  
  3898.           PDLISP language manual          PDLISP Debugging Functions
  3899.           
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.           15.4.19 The Reader Search Path Hook
  3906.  
  3907.  
  3908.           /SYS/CONST/READER_SEARCH_PATH       value of variable = 400
  3909.  
  3910.  
  3911.             (STATUS READER_SEARCH_PATH) returns the current value of
  3912.           the reader search path. (STATUS READER_SEARCH_PATH Y) sets the
  3913.           search path to the new value Y (which must be a list).
  3914.  
  3915.             As delivered, the reader search path is set to
  3916.           (/SYS/CONST /SYS/CMD).
  3917.  
  3918.  
  3919.  
  3920.  
  3921.  
  3922.  
  3923.  
  3924.  
  3925.  
  3926.  
  3927.  
  3928.  
  3929.  
  3930.  
  3931.  
  3932.  
  3933.  
  3934.  
  3935.  
  3936.  
  3937.  
  3938.  
  3939.  
  3940.  
  3941.  
  3942.  
  3943.  
  3944.  
  3945.  
  3946.  
  3947.  
  3948.  
  3949.  
  3950.  
  3951.  
  3952.  
  3953.  
  3954.  
  3955.  
  3956.                                      - 194 -              Version 1.10
  3957.           
  3958.  
  3959.  
  3960.  
  3961.  
  3962.  
  3963.  
  3964.           PDLISP language manual          PDLISP Debugging Functions
  3965.           
  3966.  
  3967.  
  3968.  
  3969.  
  3970.  
  3971.           15.4.20 The Floating Point Format Hook
  3972.  
  3973.           
  3974.           /SYS/CONST/FLOAT_FORMAT             value of variable = 500
  3975.  
  3976.  
  3977.               The floating point format hook enables the user to
  3978.           customize output of floating point numbers in PDLISP.
  3979.           Basically, this hook is a string which is interpreted by
  3980.           PDLISP in the same way that  it would be by the PRINTF
  3981.           function in the C programming language.
  3982.  
  3983.               (STATUS FLOAT_FORMAT VALUE) sets the floating point
  3984.           output format to VALUE. VALUE should be a string, and its
  3985.           meaning is identical to the analogous meaning in the C
  3986.           programming language. As delivered, this string is set to
  3987.           "%g "; for those who are not familiar with C, an
  3988.           explanation of the possible values for this parameter
  3989.           follow:
  3990.  
  3991.               Each format string starts with the percent sign ("%")
  3992.           and ends with a letter, called the conversion character.
  3993.            The conversion character must
  3994.           be "e", "f", or "g". The meaning of the conversion character
  3995.           are as follow:
  3996.  
  3997.             e  -  Floats are printed out in the form [-]m.nnnnnn[+-]xx,
  3998.                   where the number of n's is dtermined by the precision
  3999.                   specification, which is item number (4), below.
  4000.                   The default precision is 6.
  4001.  
  4002.             f  -  The float is output in the form [-]mmm.nnnnnn, where
  4003.                   the number of n's is determined by the precision
  4004.                   specification, which is described under (4), below.
  4005.                   The default precision is 6.
  4006.  
  4007.             g  -  The float is output with either %e or %f, depending
  4008.                   upon which alternative produces shorter output.
  4009.                   The number of digits trailing the decimal point
  4010.                   is specified by the precision, and the default
  4011.                   for the precision is 6.
  4012.  
  4013.  
  4014.  
  4015.  
  4016.  
  4017.  
  4018.  
  4019.  
  4020.  
  4021.  
  4022.                                      - 195 -              Version 1.10
  4023.           
  4024.  
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.           PDLISP language manual          PDLISP Debugging Functions
  4031.           
  4032.  
  4033.  
  4034.  
  4035.           
  4036.               Inbetween the percent sign and the conversion character there
  4037.           may be:
  4038.  
  4039.               (1) a minus sign, which indicates that floats should be
  4040.                   left-justified.
  4041.  
  4042.               (2) a digit or sequence of digits, which specifies a
  4043.                   minimum field width.
  4044.  
  4045.               (3) a period, which delimits the field width (number (2),
  4046.                   above) from the precision specification (item number
  4047.                   (4), below).
  4048.  
  4049.               (4) A digit or sequence of digits, which indicates the
  4050.                   number of digits to be printed to the right of the
  4051.                   decimal point.
  4052.  
  4053.             (STATUS FLOAT_FORMAT) returns the current value of this
  4054.           hook, which is always a string.
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061.  
  4062.  
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.  
  4072.  
  4073.  
  4074.  
  4075.  
  4076.  
  4077.  
  4078.  
  4079.  
  4080.  
  4081.  
  4082.  
  4083.  
  4084.  
  4085.  
  4086.  
  4087.  
  4088.                                      - 196 -              Version 1.10
  4089.           
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.           PDLISP language manual       Interfacing to the Operating System
  4097.           
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.                                    Chapter 16
  4108.  
  4109.                        Interfacing to the Operating System
  4110.  
  4111.  
  4112.  
  4113.  
  4114.                The easiest way to interface to the operating system is
  4115.           to call a program residing on disk with the shell escape. The
  4116.           shell escape can be invoked by typing an exclamation point immediately
  4117.           after the PDLISP prompt, and following that by a command to be
  4118.           sent to the host O/S. For example, we could invoke the VI editor
  4119.           on UNIX by typing:
  4120.  
  4121.  
  4122.           /USR/LOGIN->!vi foo.l
  4123.  
  4124.  
  4125.           Such an invocation would result in VI being called up on a text
  4126.           file called "foo.l". After termination of the VI session, control
  4127.           would revert back to PDLISP. The PDLISP environment should
  4128.           be as it was when VI was invoked.
  4129.  
  4130.               The most usual usage of the shell escape under PDLISP is
  4131.           to edit a lisp file. After the edit, the file can be read in using
  4132.           LOAD or LOADV. For example, after the above example, we could
  4133.           type:
  4134.  
  4135.  
  4136.           /USR/LOGIN->(loadv "foo.l")
  4137.  
  4138.  
  4139.  
  4140.               The shell escape can also be used in another way, that of
  4141.           temporarily exiting PDLISP entirely. To do this, type the
  4142.           exclamation point by itself with nothing after it, and then
  4143.           a carriage return (<CR>). For example,
  4144.  
  4145.  
  4146.           /USR/LOGIN->!<CR>
  4147.  
  4148.  
  4149.  
  4150.               On UNIX, this will result in a UNIX shell prompt being printed. You
  4151.  
  4152.  
  4153.  
  4154.                                      - 197 -              Version 1.10
  4155.           
  4156.  
  4157.  
  4158.  
  4159.  
  4160.  
  4161.  
  4162.           PDLISP language manual       Interfacing to the Operating System
  4163.           
  4164.  
  4165.  
  4166.  
  4167.           are free now to issue any UNIX shell command, and the system will behave
  4168.           as if PDLISP were not present. Upon termination of the session, you
  4169.           should be able exit back to PDLISP as follows:
  4170.  
  4171.  
  4172.           % ^D
  4173.  
  4174.  
  4175.                The actual mechanics of getting to the shell and back again vary
  4176.           from system to system. On MS-DOS (PC-DOS), the system is quite verbose
  4177.           upon being invoked from PDLISP, as follows:
  4178.  
  4179.  
  4180.           /USR/LOGIN->!
  4181.  
  4182.           The IBM Personal Computer DOS
  4183.           Version 3.10 (C)Copyright International Business Machines Corp 1981, 1985
  4184.                        (C)Copyright Microsoft Corp 1981, 1985
  4185.  
  4186.           C>
  4187.  
  4188.                At this point, you are now in DOS. In order to get back to
  4189.           PDLISP, type "exit" at the DOS command prompt, as follows:
  4190.  
  4191.           C>exit
  4192.  
  4193.           T
  4194.           /USR/LOGIN->
  4195.  
  4196.  
  4197.                If you move around the O/S directory tree in MS-DOS and
  4198.           then return to PDLISP, you will find upon your next shell escape
  4199.           that you are back in the directory from which PDLISP was booted.
  4200.           PDLISP returns to its own directory so that it can read in its
  4201.           swap file which it sometimes creates to hold some or all
  4202.           of s-expression space during the shell escape. This is not true
  4203.           of PDLISP on UNIX, because it does not need to create a swap file.
  4204.  
  4205.  
  4206.           SHELL             CSUBR       (STR) or (STR &optional SPACE)
  4207.  
  4208.               Allows calls to the shell (or ccp) of the host operating
  4209.           system. The new process is spawned, and PDLISP waits until the
  4210.           process terminates. After the process terminates, PDLISP
  4211.           resumes execution. This function returns T if the process was
  4212.           executed, and otherwise returns NIL.
  4213.  
  4214.               On operating systems which do not automatically swap
  4215.           processes to disk (such as PC-DOS or MS-DOS), this function
  4216.           takes an optional argument, SPACE. This is the number of bytes
  4217.  
  4218.  
  4219.  
  4220.                                      - 198 -              Version 1.10
  4221.           
  4222.  
  4223.  
  4224.  
  4225.  
  4226.  
  4227.  
  4228.           PDLISP language manual       Interfacing to the Operating System
  4229.           
  4230.  
  4231.  
  4232.  
  4233.           to allocate for the process being executed, and PDLISP will
  4234.           swap out as much of itself as is necessary to provide the
  4235.           requested space. If SPACE is not specified, then a default
  4236.           value is assumed. This default value is 160,000 bytes for
  4237.           MS-DOS and PC-DOS, and may vary for other operating systems;
  4238.           consult the appropriate appendix for more information.
  4239.  
  4240.  
  4241.  
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.  
  4249.  
  4250.  
  4251.  
  4252.  
  4253.  
  4254.  
  4255.  
  4256.  
  4257.  
  4258.  
  4259.  
  4260.  
  4261.  
  4262.  
  4263.  
  4264.  
  4265.  
  4266.  
  4267.  
  4268.  
  4269.  
  4270.  
  4271.  
  4272.  
  4273.  
  4274.  
  4275.  
  4276.  
  4277.  
  4278.  
  4279.  
  4280.  
  4281.  
  4282.  
  4283.  
  4284.  
  4285.  
  4286.                                      - 199 -              Version 1.10
  4287.           
  4288.  
  4289.  
  4290.  
  4291.  
  4292.  
  4293.  
  4294.           PDLISP language manual                   Storage Management
  4295.           
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.                                    Chapter 17
  4306.  
  4307.                                Storage Management
  4308.  
  4309.  
  4310.  
  4311.  
  4312.           ALLOC               CSUBR       (SEGTYPE NUMSEGS)
  4313.  
  4314.               Allows the user to manually allocate segments in PDLISP.
  4315.           SEGTYPE is an integer indicating the type of segment(s) to be
  4316.           created, and NUMSEGS is an integer which is interpreted to be
  4317.           the number of segments to be created. If successful, then this
  4318.           function returns the number of segments which have been
  4319.           allocated,  but if it runs out of memory or some other
  4320.           allocation fault occurs, it returns a value of 0. The
  4321.           interpretation of SEGTYPE is as follows:
  4322.  
  4323.               integer:        SEGMENT TYPE:
  4324.                  0, 1         used internally by system.
  4325.                  2            CODE
  4326.                  3            RNODES (ram-resident s-expression space)
  4327.                  4            DCBBLOCK (directory control blocks)
  4328.                  5            ATOMS (user-defined symbols)
  4329.                  6            LEXATOMS (lexical atoms)
  4330.                  7            HUNKS (used by strings, arrays, and structures)
  4331.  
  4332.  
  4333.               ALLOC is generally used to "tune" a system for a particular
  4334.           memory configuration.
  4335.  
  4336.  
  4337.           GC                  CSUBR       ()
  4338.  
  4339.               Invokes the mark-and-sweep garbage collector. After the
  4340.           collection is complete, this function returns an integer which
  4341.           is the number of nodes which are free in allocated memory.
  4342.           If you wish, you can make the garbage collector beep each
  4343.           time that it begins, using the GC_VERBOSITY hook, which is
  4344.           described under the STATUS function.
  4345.  
  4346.  
  4347.  
  4348.  
  4349.  
  4350.  
  4351.  
  4352.                                      - 200 -              Version 1.10
  4353.           
  4354.  
  4355.  
  4356.  
  4357.  
  4358.  
  4359.  
  4360.           PDLISP language manual                   Storage Management
  4361.           
  4362.  
  4363.  
  4364.  
  4365.  
  4366.           GETFREE             CSUBR       ()
  4367.  
  4368.               Returns an integer which is the number of free nodes
  4369.           currently on the free-list in allocated memory.
  4370.  
  4371.  
  4372.           MEMMAP              CSUBR       (&OPTIONAL X)
  4373.  
  4374.               Produces a report of memory usage on the console.
  4375.           The actual contents of this report varies according to the
  4376.           operating system in use; see the appendix corresponding to
  4377.           your situation.
  4378.  
  4379.  
  4380.  
  4381.  
  4382.  
  4383.  
  4384.  
  4385.  
  4386.  
  4387.  
  4388.  
  4389.  
  4390.  
  4391.  
  4392.  
  4393.  
  4394.  
  4395.  
  4396.  
  4397.  
  4398.  
  4399.  
  4400.  
  4401.  
  4402.  
  4403.  
  4404.  
  4405.  
  4406.  
  4407.  
  4408.  
  4409.  
  4410.  
  4411.  
  4412.  
  4413.  
  4414.  
  4415.  
  4416.  
  4417.  
  4418.                                      - 201 -              Version 1.10
  4419.           
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.  
  4426.           PDLISP language manual                   Storage Management
  4427.           
  4428.  
  4429.  
  4430.  
  4431.  
  4432.                        This page intentionally left blank
  4433.  
  4434.  
  4435.  
  4436.  
  4437.  
  4438.  
  4439.  
  4440.  
  4441.  
  4442.  
  4443.  
  4444.  
  4445.  
  4446.  
  4447.  
  4448.  
  4449.  
  4450.  
  4451.  
  4452.  
  4453.  
  4454.  
  4455.  
  4456.  
  4457.  
  4458.  
  4459.  
  4460.  
  4461.  
  4462.  
  4463.  
  4464.  
  4465.  
  4466.  
  4467.  
  4468.  
  4469.  
  4470.  
  4471.  
  4472.  
  4473.  
  4474.  
  4475.  
  4476.  
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482.  
  4483.  
  4484.                                      - 202 -              Version 1.10
  4485.           
  4486.  
  4487.  
  4488.  
  4489.  
  4490.  
  4491.  
  4492.           PDLISP language manual                   Storage Management
  4493.           
  4494.  
  4495.  
  4496.  
  4497.  
  4498.                        This page intentionally left blank
  4499.  
  4500.  
  4501.  
  4502.  
  4503.  
  4504.  
  4505.  
  4506.  
  4507.  
  4508.  
  4509.  
  4510.  
  4511.  
  4512.  
  4513.  
  4514.  
  4515.  
  4516.  
  4517.  
  4518.  
  4519.  
  4520.  
  4521.  
  4522.  
  4523.  
  4524.  
  4525.  
  4526.  
  4527.  
  4528.  
  4529.  
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.  
  4544.  
  4545.  
  4546.  
  4547.  
  4548.  
  4549.  
  4550.                                      - 203 -              Version 1.10
  4551.           
  4552.  
  4553.  
  4554.  
  4555.  
  4556.  
  4557.  
  4558.           PDLISP language manual                         Bibliography
  4559.           
  4560.  
  4561.  
  4562.  
  4563.  
  4564.  
  4565.  
  4566.  
  4567.  
  4568.  
  4569.                                    Appendix A
  4570.  
  4571.                                   Bibliography
  4572.  
  4573.  
  4574.  
  4575.           Allen, John [1978] Anatomy  of  LISP, McGraw-Hill, New York.
  4576.           The most  comprehensive,  semi-theoretical  treatment of the
  4577.           issues which face an implementor of a LISP system. 
  4578.  
  4579.             Allen, John [1979] "An Overview of LISP", Byte, Vol 4, No.
  4580.           8, pg.  10, August  1979.  A  good  introductory tutorial on
  4581.           LISP.  Unfortunately,  every  library which  I  checked  was
  4582.           missing this  very  popular issue which was a special one on
  4583.           LISP.
  4584.  
  4585.             Charniak, Eugene,  and Drew McDermott [1985], Introduction
  4586.           to  Artificial  Intelligence,  published  by  Addison-Wesley
  4587.           Publishing  Company, Inc. A modern introduction to the  A.I.
  4588.           field, using examples written in Common LISP.  This  book is
  4589.           not merely  a  rewrite  of  their  earlier  work,  which  is
  4590.           described below; that book is about systems programming,  or
  4591.           "hacking", whereas this one focuses on "higher level" issues
  4592.           and is suitable for a general introduction to LISP.
  4593.  
  4594.             Charniak, Eugene, C. K. Riesbeck, D. V. McDermott  [1980],
  4595.           Artificial  Intelligence Programming, published by  Lawrence
  4596.           Eribaum  Assiciates,  Inc. A good, introduction  to  systems
  4597.           programming  in LISP for  the  advanced  A.I.  hacker.   The
  4598.           examples given in this book are expressed in UCI-LISP, which
  4599.           is unfortunate since that  dialect  is  quite  distant  from
  4600.           Common LISP, but the  text  is  sufficiently explanatory for
  4601.           the determined reader. 
  4602.  
  4603.             Fodero, John K. [1979] "The FRANZ LISP Manual," University
  4604.           of  California,  Berkeley, California. This document,  along
  4605.           with  the  FRANZ source code, is often distributed  by  UNIX
  4606.           vendors to Berkely UNIX licensees. 
  4607.  
  4608.  
  4609.  
  4610.  
  4611.  
  4612.  
  4613.  
  4614.  
  4615.  
  4616.                                      - 204 -              Version 1.10
  4617.           
  4618.  
  4619.  
  4620.  
  4621.  
  4622.  
  4623.  
  4624.           PDLISP language manual                         Bibliography
  4625.           
  4626.  
  4627.  
  4628.  
  4629.           Galley,  S.  W. and Greg Pfister [1975]  The  MDL  Language,
  4630.           Document  SYS.11.01,  Laboratory for Computer Science,  MIT,
  4631.           Cambridge,  Massachusetts, November 1975.  A  definition  of
  4632.           MDL,  which, while nearly extinct, contributed materially to
  4633.           modern   LISPs,   particularly    in    parameter    passing
  4634.           conventions. 
  4635.  
  4636.             McCarthy, John., P.W. Abrahams,  D.J.  Edwards, T.P. Hart,
  4637.           and M.I. Levin, [1965], LISP 1.5 Programmer's Manual, second
  4638.           edition,    MIT   Press,   Cambridge,    Massachusetts.    A
  4639.           comprehensive  manual on the first "stable" LISP dialect  by
  4640.           its implementors. 
  4641.  
  4642.             Pitman,  Kent  M.  [1983],  The  Revised  MacLISP  Manual,
  4643.           MIT/LCR.TR  295,   MIT   Laboratory  for  Computer  Science,
  4644.           Cambridge, Massachusetts, May 21,  1983,  "Saturday  Evening
  4645.           Edition." The latest and greatest MacLISP manual. 
  4646.  
  4647.             Steele, Guy Lewis, Jr. et al,  [1984],  COMMON  LISP,  The
  4648.           Language,  Digital Press  (Digital  Equipment  Corporation),
  4649.           order number  EY-00031-DP.  This is the "working definition"
  4650.           of the Common LISP standard. 
  4651.  
  4652.             Steele,  Guy  Lewis,  Jr.  and  Gerald Jay Sussman  [1979]
  4653.           "Compiler  Optimization  Based  on  Viewing LAMBDA as RENAME
  4654.           plus GOTO," in Artificial Intelligence: an MIT perspective",
  4655.           volume 2, edited by Patrick H. Winston and Richard H. Brown,
  4656.           pp.   401-431.  A re-think  of  the  semantics  behind  LISP
  4657.           compiler  design,  with  particular  emphasis on  RABBIT,  a
  4658.           compiler for SCHEME, which  was  an  early  lexically scoped
  4659.           LISP dialect. 
  4660.  
  4661.             Teitelman, Warren [1974] INTERLISP Reference Manual, Xerox
  4662.           Corporation,  Palo   Alto   Research   Center,   Palo  Alto,
  4663.           California,  revised  1978.  This  is  both   an  exhaustive
  4664.           defition  of  the INTERLISP dialect, as well  as  series  of
  4665.           tutorials on various tools (the BBN structure editor,  DWIM,
  4666.           etc) which are supplied with it. 
  4667.  
  4668.  
  4669.  
  4670.  
  4671.  
  4672.  
  4673.  
  4674.  
  4675.  
  4676.  
  4677.  
  4678.  
  4679.  
  4680.  
  4681.  
  4682.                                      - 205 -              Version 1.10
  4683.           
  4684.  
  4685.  
  4686.  
  4687.  
  4688.  
  4689.  
  4690.           PDLISP language manual                         Bibliography
  4691.           
  4692.  
  4693.  
  4694.  
  4695.           Weinreb,  Daniel,  and  Moon,  David,  [1981],  LISP Machine
  4696.           Manual,  Fourth Edition, MIT  Artificial  Intelligence  Lab,
  4697.           Cambridge,   Massachusetts,   July   1981.   This   is   the
  4698.           authoritative  reference  on  ZETALISP,  which,  except  for
  4699.           dynamic scoping, is extremely  similar  to Common LISP. This
  4700.           manual is also available from Symbolics, Inc.
  4701.  
  4702.             Weissman,   Clark  [1967],  LISP  1.5  Primer,   Dickenson
  4703.           Publishing Company,  Inc., Belmont, California. A dated, but
  4704.           comprehensible introduction to LISP.
  4705.  
  4706.             Winston, Patrick H., and Horn, Berthold Klaus Paul. [1984]
  4707.           LISP,   Second   Edition,   Addison-Wesley,    Menlo   Park,
  4708.           California.  A  good  introductory text on LISP, which  uses
  4709.           Common LISP for its examples. 
  4710.  
  4711.           
  4712.  
  4713.  
  4714.  
  4715.  
  4716.  
  4717.  
  4718.  
  4719.  
  4720.  
  4721.  
  4722.  
  4723.  
  4724.  
  4725.  
  4726.  
  4727.  
  4728.  
  4729.  
  4730.  
  4731.  
  4732.  
  4733.  
  4734.  
  4735.  
  4736.  
  4737.  
  4738.  
  4739.  
  4740.  
  4741.  
  4742.  
  4743.  
  4744.  
  4745.  
  4746.  
  4747.  
  4748.                                      - 206 -              Version 1.10
  4749.           
  4750.  
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.           PDLISP language manual                         Bibliography
  4757.           
  4758.  
  4759.  
  4760.  
  4761.  
  4762.                        This page intentionally left blank
  4763.  
  4764.  
  4765.  
  4766.  
  4767.  
  4768.  
  4769.  
  4770.  
  4771.  
  4772.  
  4773.  
  4774.  
  4775.  
  4776.  
  4777.  
  4778.  
  4779.  
  4780.  
  4781.  
  4782.  
  4783.  
  4784.  
  4785.  
  4786.  
  4787.  
  4788.  
  4789.  
  4790.  
  4791.  
  4792.  
  4793.  
  4794.  
  4795.  
  4796.  
  4797.  
  4798.  
  4799.  
  4800.  
  4801.  
  4802.  
  4803.  
  4804.  
  4805.  
  4806.  
  4807.  
  4808.  
  4809.  
  4810.  
  4811.  
  4812.  
  4813.  
  4814.                                      - 207 -              Version 1.10
  4815.           
  4816.  
  4817.  
  4818.  
  4819.  
  4820.  
  4821.  
  4822.           PDLISP language manual                         Bibliography
  4823.           
  4824.  
  4825.  
  4826.  
  4827.  
  4828.                        This page intentionally left blank
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843.  
  4844.  
  4845.  
  4846.  
  4847.  
  4848.  
  4849.  
  4850.  
  4851.  
  4852.  
  4853.  
  4854.  
  4855.  
  4856.  
  4857.  
  4858.  
  4859.  
  4860.  
  4861.  
  4862.  
  4863.  
  4864.  
  4865.  
  4866.  
  4867.  
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.                                      - 208 -              Version 1.10
  4881.           
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.           PDLISP language manual                         Bibliography
  4889.           
  4890.  
  4891.  
  4892.  
  4893.  
  4894.                        This page intentionally left blank
  4895.  
  4896.  
  4897.  
  4898.  
  4899.  
  4900.  
  4901.  
  4902.  
  4903.  
  4904.  
  4905.  
  4906.  
  4907.  
  4908.  
  4909.  
  4910.  
  4911.  
  4912.  
  4913.  
  4914.  
  4915.  
  4916.  
  4917.  
  4918.  
  4919.  
  4920.  
  4921.  
  4922.  
  4923.  
  4924.  
  4925.  
  4926.  
  4927.  
  4928.  
  4929.  
  4930.  
  4931.  
  4932.  
  4933.  
  4934.  
  4935.  
  4936.  
  4937.  
  4938.  
  4939.  
  4940.  
  4941.  
  4942.  
  4943.  
  4944.  
  4945.  
  4946.                                      - 209 -              Version 1.10
  4947.           
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.           PDLISP language manual                         Bibliography
  4955.           
  4956.  
  4957.  
  4958.  
  4959.  
  4960.                        This page intentionally left blank
  4961.  
  4962.  
  4963.  
  4964.  
  4965.  
  4966.  
  4967.  
  4968.  
  4969.  
  4970.  
  4971.  
  4972.  
  4973.  
  4974.  
  4975.  
  4976.  
  4977.  
  4978.  
  4979.  
  4980.  
  4981.  
  4982.  
  4983.  
  4984.  
  4985.  
  4986.  
  4987.  
  4988.  
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999.  
  5000.  
  5001.  
  5002.  
  5003.  
  5004.  
  5005.  
  5006.  
  5007.  
  5008.  
  5009.  
  5010.  
  5011.  
  5012.                                      - 210 -              Version 1.10
  5013.           
  5014.  
  5015.  
  5016.  
  5017.  
  5018.  
  5019.  
  5020.           PDLISP language manual               PDLISP Error Messages
  5021.           
  5022.  
  5023.  
  5024.  
  5025.  
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031.                                    Appendix B
  5032.  
  5033.                              PDLISP Error Messages
  5034.  
  5035.  
  5036.  
  5037.             Error  messages  in PDLISP  are  printed  in  two  forms,
  5038.           depending upon whether the  error  was  detected  within the
  5039.           interpreter, or if it  was  encountered  by  a LISP-callable
  5040.           routine.  For errors which originate within the interpreter,
  5041.           the  name of the routine followed by a set of parenthesis is
  5042.           printed along with an error message.  For example:
  5043.  
  5044.  
  5045.           ***> BINDER(): stack overflow.
  5046.  
  5047.           In  the  above  example,  a stack overflow was  detected  in
  5048.           BINDER(),  which is a routine which is internal  to  PDLISP
  5049.           and  which  is  not  accessible  directly  from LISP.  After
  5050.           printing out the error message, the system  returned  to the
  5051.           normal top-level prompt. 
  5052.  
  5053.             Errors  which are detected in routines which are  callable
  5054.           from PDLISP  are  printed  out  slightly  differently.  For
  5055.           example:
  5056.  
  5057.  
  5058.           ***> CAR: arg is atomic.
  5059.           /USR/LOGIN->
  5060.  
  5061.           Again, after printing out  the  error  message,  the  system
  5062.           returned to the top-level prompt. 
  5063.  
  5064.             Those errors  which  definitely indicate corruption of the
  5065.           virtual  image  are  noted  as  being  "fatal" or  "probably
  5066.           fatal".  Corruption of a  virtual  image could occur because
  5067.           of  undetected  memory  errors  or other hardware  problems,
  5068.           commission  by  the  user  of  an  error  which  I  did  not
  5069.           anticipate,  or (heaven forbid!)  a bug in PDLISP  itself. 
  5070.           In all cases where an error might indicate corruption of the
  5071.           current  virtual image, one should immediately terminate the
  5072.           current PDLISP session and revert to a virtual  image which
  5073.           is  known  to  be  good.  If you are running  PDLISP  on  a
  5074.           machine which does not  have  a  hardware  memory management
  5075.  
  5076.  
  5077.  
  5078.                                      - 211 -              Version 1.10
  5079.           
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.           PDLISP language manual               PDLISP Error Messages
  5087.           
  5088.  
  5089.  
  5090.  
  5091.           unit (MS-DOS, PC-DOS, MACINTOSH, etc.)  it would probably be
  5092.           a  good idea to reboot the  entire  system.   A  single  bad
  5093.           pointer  wandering around inside of such a machine can cause
  5094.           insidiously subtle bugs that are difficult to trace. 
  5095.  
  5096.           
  5097.  
  5098.  
  5099.           ***> *: 1st arg is not a number.
  5100.           ***> *: 2nd arg is not a number.
  5101.           ***> +: 1st arg is not a number.
  5102.           ***> +: 2nd arg is not a number.
  5103.           ***> -: bad 2nd arg.
  5104.               All of the above functions expect that all of their
  5105.           arguments be numbers (either integers or floats). Not fatal.
  5106.  
  5107.           ***> <: 1st arg is not a number.
  5108.           ***> <: 2nd arg is not a number.
  5109.           ***> <=: 1st arg is not a number.
  5110.           ***> <=: 2nd arg is not a number.
  5111.           ***> <=: illegal arguments.
  5112.           ***> %: 1st arg is not a number.
  5113.           ***> %: 2nd arg is not a number.
  5114.               All of these functions expect 2 arguments, both
  5115.           of which must be numbers (either integers or floats).
  5116.           Not fatal.
  5117.  
  5118.           ***> ALLOC: 1st argument must be an integer
  5119.           ***> ALLOC: 2nd argument must be an integer
  5120.               ALLOC expects 2 arguments, both of which must be
  5121.           integers. Not fatal.
  5122.  
  5123.           ***> APPEND: non-NIL atomic arg.
  5124.               APPEND doesn't like arguments which are not lists.
  5125.           Not fatal.
  5126.  
  5127.           ***> APPLY: illegal fn.
  5128.               The evaluator attempted to evaluate an expression
  5129.           which had a bad form in its expression slot. Probably
  5130.           not fatal.
  5131.  
  5132.           ***> APPLY: attempted to apply built-in symbol
  5133.           named: <symbol name>
  5134.               The evaluator attempted to apply a built-in
  5135.           constant, such as T or NIL, as a function. This
  5136.           error is usually caused by some mismatched parenthesis
  5137.           in a COND or some other complicated form which causes
  5138.           the evaluator to get lost. Not usually fatal.
  5139.  
  5140.  
  5141.  
  5142.  
  5143.  
  5144.                                      - 212 -              Version 1.10
  5145.           
  5146.  
  5147.  
  5148.  
  5149.  
  5150.  
  5151.  
  5152.           PDLISP language manual               PDLISP Error Messages
  5153.           
  5154.  
  5155.  
  5156.  
  5157.  
  5158.           ***> APPLY: function <function name> is unbound
  5159.               Probably the most common error message in the
  5160.           system, and not fatal. Define the symbol as a function
  5161.           and try again. Not fatal.
  5162.  
  5163.           ***> APPLY: macros not a legal function arg.
  5164.               APPLY cannot apply a function which is defined as
  5165.           a MACRO. Probably not fatal.
  5166.  
  5167.           ***> APPLY: illegal function arg.
  5168.               APPLY was passed a function which was not defined as
  5169.           a LAMBDA, NLAMBDA, CSUBR, CNSUBR, SUBR, or NSUBR. Probably
  5170.           not fatal.
  5171.  
  5172.           ***> BAK_N: arg must be an integer.
  5173.               BAK_N expects to be fed an integer argument which
  5174.           tells it how many frames to display, so give it one.
  5175.           Not fatal.
  5176.  
  5177.           ***> BAK_N: ran out of frames to examine.
  5178.               BAK_N was asked to display X frames on the environment
  5179.           stack, but only Y frames were available, where Y < X. Not
  5180.           fatal.
  5181.  
  5182.           ***> BAKTRCE: bad arg.
  5183.           ***> BAKTRCE: param not an integer.
  5184.               BAKTRCE expects a single parameter, which must be
  5185.           an integer, to tell it what kind of report to generate.
  5186.           Currently, legal values for this parameter are 0 and 1.
  5187.  
  5188.               The following messages are all issued by BINDER(),
  5189.           which is a routine inside of the interpreter which binds
  5190.           parameter lists to their values.
  5191.  
  5192.           ***> BINDER(): initialization of non-&optional param.
  5193.               The system binder found a case where a formal
  5194.           parameter which was not declared as being optional
  5195.           was being initialized to a default value. Not fatal.
  5196.  
  5197.  
  5198.  
  5199.  
  5200.  
  5201.  
  5202.  
  5203.  
  5204.  
  5205.  
  5206.  
  5207.  
  5208.  
  5209.  
  5210.                                      - 213 -              Version 1.10
  5211.           
  5212.  
  5213.  
  5214.  
  5215.  
  5216.  
  5217.  
  5218.           PDLISP language manual               PDLISP Error Messages
  5219.           
  5220.  
  5221.  
  5222.  
  5223.  
  5224.           ***> BINDER(): missing &rest formal parameter.
  5225.               BINDER() expects to find a formal parameter after
  5226.           the &rest keyword in a function declaration. Not fatal.
  5227.  
  5228.           ***> BINDER(): more than 1 &REST formal param.
  5229.               Since a &REST parameter is bound to the rest of the
  5230.           actual parameter list, there is nothing left for a subsequent
  5231.           &REST parameter to be bound to. Delete the extraneous
  5232.           parameter. Not fatal.
  5233.  
  5234.           ***> BINDER(): missing &OPTIONAL formal param.
  5235.               BINDER() expects to find a formal parameter after the
  5236.           &OPTIONAL keyword, so put one in. Not fatal.
  5237.  
  5238.           ***> BINDER(): missing &AUX parameter(s).
  5239.               BINDER() expects to see the name(s) of 1 or more
  5240.           local variables after the &AUX keyword, so put them in.
  5241.           Not fatal.
  5242.  
  5243.           ***> BINDER(): bad formal parameter.
  5244.               BINDER() found a formal parameter which it doesn't like,
  5245.           such as a constant (string, number, or built-in node such
  5246.           as T or NIL). Formal parameters must be symbols. Not fatal.
  5247.  
  5248.           ***> BINDER(): popframe failed.
  5249.               The internal routine which pops the LISP environment
  5250.           detected an inconsistency in the environment stack. Possibly
  5251.           fatal.
  5252.  
  5253.           ***> BINDER(): too few arguments.
  5254.               The call to the routine being interpreted didn't provide
  5255.           enough "actual parameters", or "arguments", to cover all of
  5256.           the non-&OPTIONAL parameters in the function declaration.
  5257.           Not fatal.
  5258.  
  5259.           ***> BINDER(): too many arguments.
  5260.               The call to the routine being interpreted provided
  5261.           too many actual parameters, and they could not be matched.
  5262.           Either change the call or the function declaration. Not fatal.
  5263.  
  5264.  
  5265.  
  5266.  
  5267.  
  5268.  
  5269.  
  5270.  
  5271.  
  5272.  
  5273.  
  5274.  
  5275.  
  5276.                                      - 214 -              Version 1.10
  5277.           
  5278.  
  5279.  
  5280.  
  5281.  
  5282.  
  5283.  
  5284.           PDLISP language manual               PDLISP Error Messages
  5285.           
  5286.  
  5287.  
  5288.  
  5289.  
  5290.           ***> BINDER(): argument stack underflow.
  5291.               Somehow, the environment stack got out of synchronization
  5292.           with the binder. Extremely fatal.
  5293.  
  5294.           ***> BINDER(): bad local variable list.
  5295.               The binder has discovered a fault in an initialized
  5296.           parameter list, such as might be passed to LET. Probably fatal.
  5297.  
  5298.           ***> BLDVVLST(): frame bashed.
  5299.               An internal routine in the interpreter has detected a
  5300.           fault in the environment stack. Probably fatal.
  5301.  
  5302.           ***> BLOCK: fumbled the return.
  5303.               BLOCK was unable to catch a return thrown from somewhere.
  5304.           Probably fatal.
  5305.  
  5306.           ***> BLOCK: popframe failed.
  5307.               BLOCK was unable to pop the environment stack. Probably
  5308.           fatal.
  5309.  
  5310.           ***> BOUNDP: arg must be a symbol.
  5311.               Only symbols can be "bound" or "unbound"; everything
  5312.           else is a constant. Not fatal.
  5313.  
  5314.           ***> CATCH: fumbled the catch
  5315.               CATCH was unable to resume control from a THROW
  5316.           somewhere within its scope. Probably fatal.
  5317.  
  5318.  
  5319.  
  5320.  
  5321.  
  5322.  
  5323.  
  5324.  
  5325.  
  5326.  
  5327.  
  5328.  
  5329.  
  5330.  
  5331.  
  5332.  
  5333.  
  5334.  
  5335.  
  5336.  
  5337.  
  5338.  
  5339.  
  5340.  
  5341.  
  5342.                                      - 215 -              Version 1.10
  5343.           
  5344.  
  5345.  
  5346.  
  5347.  
  5348.  
  5349.  
  5350.           PDLISP language manual               PDLISP Error Messages
  5351.           
  5352.  
  5353.  
  5354.  
  5355.  
  5356.           ***> CAR: arg is atomic.
  5357.           ***> CDR: arg is atomic.
  5358.           ***> CAAR: arg to CAR is atomic.
  5359.           ***> CDAR: arg to CDR is atomic.
  5360.           ***> CADR: arg to CAR is atomic
  5361.           ***> CDDR: arg to 1st CDR is atomic.
  5362.           ***> CAAAR: arg to 1st car is atomic.
  5363.           ***> CAADR: arg to 1st car is atomic.
  5364.           ***> CADAR: arg to 1st CAR is atomic.
  5365.           ***> CADDR: arg to 1st car is atomic.
  5366.           ***> CDAAR: arg to CDR is atomic.
  5367.           ***> CDADR: arg to 1st CDR is atomic.
  5368.           ***> CDDAR: arg to 1st CDR is atomic.
  5369.           ***> CDDDR: arg to 1st CDR is atomic.
  5370.           ***> CADDDR: arg to CAR is atomic.
  5371.               All of these error messages are derivatives of the
  5372.           same error: at some point CAR or CDR was presented with
  5373.           an atomic form as an argument. While some dialects (i.e.,
  5374.           MACLISP) permitted  such activities, PDLISP is a
  5375.           non-nuclear environment (you can't split an atom in
  5376.           PDLISP). Not fatal.
  5377.  
  5378.           ***> CD: arg not a symbol.
  5379.               CD attempted to change to a directory which is not
  5380.           even a symbol, much less legal. Not fatal by itself.
  5381.  
  5382.           ***> CD: <symbol name> not a directory.
  5383.               CD quite rightfully expects as its argument a symbol
  5384.           which is bound as a directory. Not fatal.
  5385.  
  5386.           ***> COND: illegal form
  5387.               Either the list of COND-pairs or an element of a list
  5388.           of COND-pairs was not a cons-cell (i.e., was atomic). Not
  5389.           fatal.
  5390.  
  5391.           ***> CONS: incorrect number of arguments.
  5392.               CONS, when called from the interpreter, checks to
  5393.           see that it is passed exactly two arguments. Not fatal.
  5394.  
  5395.  
  5396.  
  5397.  
  5398.  
  5399.  
  5400.  
  5401.  
  5402.  
  5403.  
  5404.  
  5405.  
  5406.  
  5407.  
  5408.                                      - 216 -              Version 1.10
  5409.           
  5410.  
  5411.  
  5412.  
  5413.  
  5414.  
  5415.  
  5416.           PDLISP language manual               PDLISP Error Messages
  5417.           
  5418.  
  5419.  
  5420.  
  5421.  
  5422.           ***> DEACTIVE(): illegal tag.
  5423.               Indicates a fault in the mark & sweep garbage
  5424.           collection system. Treat as fatal.
  5425.  
  5426.           ***> DIV: 1st arg is not an integer.
  5427.           ***> DIV: 2nd arg is not an integer.
  5428.               DIV expects both of its arguments to be integers.
  5429.           Not fatal.
  5430.  
  5431.           ***> EVAL: binding error in lambda named: <symbol-name>
  5432.               The binder was unable to match the formal and
  5433.           actual parameter lists for some function bound as
  5434.           a lambda. Usually issued in conjunction with some
  5435.           more specific complaints from the binder. Not fatal.
  5436.  
  5437.           ***> EVAL: binding error in lambda named: ANONYMOUS
  5438.               Same as above, except that the functional part
  5439.           of the form being evaluated did not have a name
  5440.           (i.e., it was "anonymous"). Not fatal.
  5441.  
  5442.           ***> EVAL: lexprs not implemented yet.
  5443.               LEXPR's don't exist in PDLISP yet (some say that
  5444.           they never should). Not fatal.
  5445.  
  5446.           ***> EVAL: binding error in nlambda named: <symbol-name>
  5447.               Usually issued with some specific error message from
  5448.           the binder, and not fatal.
  5449.  
  5450.           ***> EVAL: variable <symbol-name> is unbound.
  5451.               EVAL tried to look up the value of an unbound symbol.
  5452.           Not fatal.
  5453.  
  5454.           ***> EVAL: out of stack space.
  5455.               The control stack collided with the argument stack.
  5456.           This should never happen under Berkeley UNIX, because
  5457.           new stack pages are allocated as needed. If this happens
  5458.           repeatedly on MS-DOS or some other machine which does not
  5459.           have a Memory Management Unit (MMU), then look in the
  5460.           appendix in this manual to see what options are available.
  5461.           Not fatal.
  5462.  
  5463.  
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474.                                      - 217 -              Version 1.10
  5475.           
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.           PDLISP language manual               PDLISP Error Messages
  5483.           
  5484.  
  5485.  
  5486.  
  5487.  
  5488.           ***> EVAL: function tag out of range.
  5489.               The evaluator attempted to evaluate an expression
  5490.           which had a bad form in its function slot. This error
  5491.           is often caused by some mismatched parenthesis in a
  5492.           complicated form, such as a COND. Not usually fatal.
  5493.  
  5494.           ***> EVAL: popframe failed.
  5495.               The internal routine which pops the LISP environment
  5496.           detected an inconsistency in the environment stack.
  5497.           Possibly fatal.
  5498.  
  5499.           ***> EVAL: fumbled the return.
  5500.               Another error message which should never occur.
  5501.           Probably indicates a bashed pointer somewhere, and
  5502.           probably fatal.
  5503.  
  5504.           ***> EVAL: expression has bad tag.
  5505.               EVAL cannot make head or tail out of the expression
  5506.           which it has been asked to evaluate. Probably fatal.
  5507.  
  5508.           ***> EXPLODE: arg not atomic.
  5509.               EXPLODE currently works only with symbols and other
  5510.           atoms. Not fatal.
  5511.  
  5512.           ***> FBOUNDP: arg not a symbol.
  5513.               Only symbols can be bound as functions. Not fatal.
  5514.  
  5515.           ***> FCLOSE: arg must be an integer.
  5516.               FCLOSE expects as its argument a "handle" which
  5517.           corresponds to an i/o stream. Not fatal.
  5518.  
  5519.           ***> FCREATE: argument must be a string.
  5520.               FCREATE expects as its argument a string which is
  5521.           a legal file name for the host operating system. Not fatal.
  5522.  
  5523.               The following error messages are issued by FINDATOM(),
  5524.           which is an internal routine in the reader which looks up
  5525.           symbol names to see if they are already present in the
  5526.           object list.
  5527.  
  5528.  
  5529.  
  5530.  
  5531.  
  5532.  
  5533.  
  5534.  
  5535.  
  5536.  
  5537.  
  5538.  
  5539.  
  5540.                                      - 218 -              Version 1.10
  5541.           
  5542.  
  5543.  
  5544.  
  5545.  
  5546.  
  5547.  
  5548.           PDLISP language manual               PDLISP Error Messages
  5549.           
  5550.  
  5551.  
  5552.  
  5553.  
  5554.           ***> FINDATOM(): idptr argument not a string.
  5555.               FINDATOM() was passed a bad symbol print-name.
  5556.           Probably fatal.
  5557.  
  5558.           ***> FINDATOM(): directory argument not a symbol.
  5559.               FINDATOM() was passed a bad directory argument.
  5560.           Probably fatal, and the directory structure is probably
  5561.           corrupted. Probably fatal.
  5562.  
  5563.           ***> FINDATOM(): <symbol name> is not a directory.
  5564.           ***> FINDATOM(): bad hanger node.
  5565.           ***> FINDATOM(): hanger chain broken.
  5566.               FINDATOM() detected an inconsistency in the linked list
  5567.           which constitutes a directory. Probably fatal.
  5568.  
  5569.           ***> FINDATOM(): bad atom interned.
  5570.               FINDATOM() found an object interned in a directory which
  5571.           is not a valid symbol. Possibly fatal.
  5572.  
  5573.           ***> FINDBF(): hanger node expected.
  5574.               An internal routine which searches along a directory has
  5575.           found an inconsistency. Probably fatal.
  5576.  
  5577.           ***> FLATSIZE(): tag error
  5578.               The routine inside the interpreter which determines the
  5579.           length of the printed representation of an object was handed
  5580.           garbage. Indicates a possibly corrupted virtual image, and
  5581.           possibly fatal.
  5582.  
  5583.           ***> FOPEN: argument must be a string.
  5584.               FOPEN expects a string containing the name of a file to
  5585.           open on the host o/s. Not fatal.
  5586.  
  5587.           ***> FREAD: argument not an integer.
  5588.               FREAD expects as an argument an integer which is the
  5589.           "handle" of the file to be read. Not fatal.
  5590.  
  5591.           ***> FSEEK: 1st arg is not an integer
  5592.           ***> FSEEK: 2nd arg is not an integer
  5593.           ***> FSEEK: 3rd arg is not an integer
  5594.               All of the arguments to FSEEK must be integers; the
  5595.           file i/o system works in terms of "handles", or numbers
  5596.           which correspond to an i/o stream.
  5597.  
  5598.  
  5599.  
  5600.  
  5601.  
  5602.  
  5603.  
  5604.  
  5605.  
  5606.                                      - 219 -              Version 1.10
  5607.           
  5608.  
  5609.  
  5610.  
  5611.  
  5612.  
  5613.  
  5614.           PDLISP language manual               PDLISP Error Messages
  5615.           
  5616.  
  5617.  
  5618.  
  5619.  
  5620.           ***> GENSTRING: illegal &optional arg.
  5621.               If the optional argument to GENSTRING is present, it must
  5622.           be a string. Not fatal.
  5623.  
  5624.           ***> GETCHUNK(): segment descriptor table bashed on entrance.
  5625.           ***> GETCHUNK(): segment table size exceeded.
  5626.           ***> GETCHUNK(): segment type = code.
  5627.           ***> GETCHUNK(): segment type error.
  5628.               The internal routine which allocates chunks of
  5629.           memory has detected an error. In the case of "segment
  5630.           table size exceeded", you have run out of memory.
  5631.           All are fatal.
  5632.  
  5633.           ***> GETMODE: arg not a symbol.
  5634.               Only symbols have access modes. Not fatal.
  5635.  
  5636.           ***> GLOBAL: attempted to set mode of lexical atom.
  5637.               Only dynamic symbols can be global, not fatal.
  5638.  
  5639.           ***> GLOBAL: arg not a symbol.
  5640.               Obviously, only symbols can be "global" or "local,"
  5641.           since symbols are the only things which are interned on
  5642.           the object list. Everything else is a constant.
  5643.  
  5644.           ***> GO: attempted jump to non-atomic label.
  5645.           ***> GO: unable to throw control.
  5646.           ***> GO: unable to match go label.
  5647.               GO detected an anomaly in the environment stack. Probably
  5648.           fatal.
  5649.  
  5650.           ***> IMPLODE-TO-STRING: element of list not a symbol.
  5651.               IMPLODE-TO-STRING expects a list of symbols. This
  5652.           function may be extended in a future release to implode
  5653.           other things.
  5654.  
  5655.           ***> INITLISP(): unable to read the file 'pdinit.l'
  5656.               The interpreter expects to find the file "pdinit.l"
  5657.           in the current directory on boot-up unless the name of a
  5658.           virtual image was given on the command line.
  5659.  
  5660.  
  5661.  
  5662.  
  5663.  
  5664.  
  5665.  
  5666.  
  5667.  
  5668.  
  5669.  
  5670.  
  5671.  
  5672.                                      - 220 -              Version 1.10
  5673.           
  5674.  
  5675.  
  5676.  
  5677.  
  5678.  
  5679.  
  5680.           PDLISP language manual               PDLISP Error Messages
  5681.           
  5682.  
  5683.  
  5684.  
  5685.  
  5686.           ***> INITPTR(): idptr illegal.
  5687.           ***> INITPTR(): oblist not atomic.
  5688.           ***> INITPTR(): oblist not a directory.
  5689.           ***> INITPTR(): dcb corrupted.
  5690.           ***> INITPTR(): bad dcb link in directory.
  5691.           ***> INITPTR(): directory bashed.
  5692.               INITPTR() is a routine deep inside the reader. Any
  5693.           complaints from it indicate that something is seriously
  5694.           wrong with the current virtual image. Consider these
  5695.           messages fatal.
  5696.  
  5697.           ***> INITSTOR: unable to reset memory.
  5698.               The internal routine which initializes memory was unable
  5699.           to get cooperation from the operating system. Probably fatal.
  5700.  
  5701.               The following messages are issued by INTERN(), which
  5702.           is the routine inside the reader which puts symbols in
  5703.           the directory system.
  5704.  
  5705.           ***> INTERN(): id not a string.
  5706.               INTERN() was asked to intern an object with an invalid
  5707.           print-name. Not fatal by itself.
  5708.  
  5709.           ***> INTERN(): id has zero length.
  5710.               INTERN() was asked to intern an object with a null string
  5711.           ("") as its print-name. Not fatal by itself.
  5712.           
  5713.           ***> INTERN(): oblist argument not a legal symbol.
  5714.               INTERN() was asked to intern an object on a non-existant
  5715.           directory. Not fatal by itself.
  5716.  
  5717.           ***> INTERN(): illegal position argument.
  5718.           ***> INTERN(): invalid atomic position argument.
  5719.           ***> INTERN(): <symbol name> is not a directory.
  5720.               The directory control block system got confused. Treat
  5721.           current virtual image with suspicion.
  5722.  
  5723.           ***> LBREAK(): fell through setjmp().
  5724.               Indicates that the compiler which I used to compile the
  5725.           interpreter is broken. Please call me. Definitely fatal.
  5726.  
  5727.  
  5728.  
  5729.  
  5730.  
  5731.  
  5732.  
  5733.  
  5734.  
  5735.  
  5736.  
  5737.  
  5738.                                      - 221 -              Version 1.10
  5739.           
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.           PDLISP language manual               PDLISP Error Messages
  5747.           
  5748.  
  5749.  
  5750.  
  5751.  
  5752.           ***> LET or LET*: bad param list.
  5753.               LET or LET* could not process an initialized variable
  5754.           list, which could be because it is poorly formed. Not fatal.
  5755.  
  5756.           ***> LET or LET*: popframe failed.
  5757.               LET or LET* was unable to pop the environment stack
  5758.           after the body of the LET was executed. Probably fatal.
  5759.  
  5760.           ***> LEXBIND(): arg not a symbol.
  5761.               The internal routine which retrieves the lexical binding
  5762.           of a symbol was passed an illegal argument. This should never
  5763.           happen, and is probably fatal.
  5764.  
  5765.           ***> LEXBIND(): arg not a dynamic symbol.
  5766.               The internal routine which retrieves the lexical binding
  5767.           of a symbol was passed an illegal argument. Probably fatal.
  5768.  
  5769.           ***> LEXTRAN(): illegal arg.
  5770.               The internal routine which translates a lexical reference
  5771.           was passed a bad argument. Probably fatal.
  5772.  
  5773.           ***> LEXTRAN(): broken lexical link.
  5774.               The internal routine which translates a lexical reference
  5775.           detected a broken link in the lexical binding system. Probably
  5776.           fatal, and the object list is probably messed up.
  5777.  
  5778.           ***> LOAD or LOADV: argument <arg> is not a string.
  5779.           ***> LOAD or LOADV: argument not atomic.
  5780.               LOAD and LOADV expect as their argument a string
  5781.           specifying the name of a file to be read in. Not fatal.
  5782.  
  5783.           ***> LSTCMP(): illegal 1st arg
  5784.           ***> LSTCMP(): illegal 2nd arg
  5785.               The internal routine which compares strings was handed
  5786.           garbage. Probably fatal.
  5787.  
  5788.           ***> LSTRLEN(): bad argument.
  5789.               The internal routine which finds the length of a LISP
  5790.           string was handed something which is not a string. Fatal.
  5791.  
  5792.  
  5793.  
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802.  
  5803.  
  5804.                                      - 222 -              Version 1.10
  5805.           
  5806.  
  5807.  
  5808.  
  5809.  
  5810.  
  5811.  
  5812.           PDLISP language manual               PDLISP Error Messages
  5813.           
  5814.  
  5815.  
  5816.  
  5817.  
  5818.           ***> MACXPND: arg not a macro.
  5819.               The macro expander tried to expand something which was
  5820.           not a macro.
  5821.  
  5822.           ***> MACXPND: arg not a cons.
  5823.               MACXPND was called from some LISP program with an
  5824.           argument which was not a cons cell. Not usually fatal.
  5825.  
  5826.           ***> MACXPND: attempted to access functional value of
  5827.           built-in symbol named: <symbol name>
  5828.               MACXPND tried to expand a built-in constant, such as
  5829.           T or NIL, which obviously cannot be defined as a MACRO.
  5830.           Not fatal.
  5831.  
  5832.           ***> MACXPND: arg not a macro.
  5833.               MACXPND was called from a LISP function and tried
  5834.           to expand something which was not defined as a macro.
  5835.           Not fatal.
  5836.  
  5837.           ***> MARK(): free atom or node list corrupted.
  5838.           ***> MARK(): found unmarked system atom.
  5839.           ***> MARK(): found illegal tag value.
  5840.               The mark routine in the mark and sweep garbage collector
  5841.           found an inconsistency in the virtual image. Treat all of
  5842.           these as fatal, and please let me know about them.
  5843.  
  5844.           ***> MARKESTK(): environment stack probably bashed.
  5845.               The part of the mark and sweep garbage collector which
  5846.           marks the environment stack found an inconsistency. Probably
  5847.           fatal.
  5848.  
  5849.           ***> MD: arg not a symbol.
  5850.               MD attempted to make an object which is not a symbol
  5851.           (such as a number or a string) into a directory. Shame on you!
  5852.           Not fatal.
  5853.  
  5854.           ***> MD: arg not a directory.
  5855.               Same as above.
  5856.  
  5857.  
  5858.  
  5859.  
  5860.  
  5861.  
  5862.  
  5863.  
  5864.  
  5865.  
  5866.  
  5867.  
  5868.  
  5869.  
  5870.                                      - 223 -              Version 1.10
  5871.           
  5872.  
  5873.  
  5874.  
  5875.  
  5876.  
  5877.  
  5878.           PDLISP language manual               PDLISP Error Messages
  5879.           
  5880.  
  5881.  
  5882.  
  5883.  
  5884.           ***> MOD: 1st arg is not an integer.
  5885.           ***> MOD: 2nd arg is not an integer.
  5886.               MOD expects 2 arguments, and both must be integers.
  5887.  
  5888.           ***> SHELL: unable to create swap file.
  5889.           ***> SHELL: unable to read swap file.
  5890.               Either of these errors means that the operating system
  5891.           was unable to perform a disk operation which SHELL requested.
  5892.           On operating systems which do not automatically swap programs
  5893.           in and out of RAM, such as MS-DOS, PDLISP creates a temporary
  5894.           file on the disk, if necessary. This file is called PDLISP.SWP.
  5895.           One possible explanation for a failure of this kind is a disk
  5896.           which is nearly full. Not fatal, but you won't be able to exec
  5897.           anything.
  5898.  
  5899.           ***> SHELL: 2nd arg must be an integer.
  5900.               SHELL expects 1 or 2 arguments, a string to be executed,
  5901.           and (optionally, on MS-DOS and some other environments)
  5902.           an integer telling it how much ram to allocate, in bytes.
  5903.           Not fatal.
  5904.  
  5905.           ***> PATHSTR: arg is not a symbol.
  5906.           ***> PATHLST: arg not a symbol.
  5907.               Both of these functions expect symbols as arguments.
  5908.           Not fatal.
  5909.  
  5910.           ***> PATHNME(): arg not a legal symbol.
  5911.           ***> PATHNME(): argument is not legal.
  5912.               PATHNME was passed an argument which is probably not
  5913.           a symbol or which is otherwise unacceptible. Not fatal.
  5914.  
  5915.           ***> PATHSTR: arg not a symbol.
  5916.               PATHSTR was passed an illegal argument. Not fatal.
  5917.  
  5918.           ***> PLIST: argument must be a symbol.
  5919.               Only symbols have property lists. Not fatal.
  5920.  
  5921.           ***> POPNODE(): out of s-expression space.
  5922.           ***> POPDCB(): out of memory space.
  5923.               Either of the above error messages indicate that you have
  5924.           run out of memory. Disasters like this can be avoided by using
  5925.           the MEMMAP command. Fatal.
  5926.  
  5927.  
  5928.  
  5929.  
  5930.  
  5931.  
  5932.  
  5933.  
  5934.  
  5935.  
  5936.                                      - 224 -              Version 1.10
  5937.           
  5938.  
  5939.  
  5940.  
  5941.  
  5942.  
  5943.  
  5944.           PDLISP language manual               PDLISP Error Messages
  5945.           
  5946.  
  5947.  
  5948.  
  5949.  
  5950.           ***> POPLATM(): free-list ptr bashed.
  5951.           ***> POPLATOM(): free-list corrupted.
  5952.           ***> POPATOM(): dynamic atom free-list ptr bashed.
  5953.           ***> POPATOM(): dynamic atom free-list corrupted.
  5954.           ***> POPNODE(): s-expression free-list bashed.
  5955.           ***> POPNODE(): node free-list ptr bashed.
  5956.           ***> POPNODE(): free node list corrupted.
  5957.           ***> POPNODE(): non-nil car of node on free-list
  5958.           ***> POPDCB(): free dcb list probably damaged.
  5959.               All of the above error messages indicate that something is
  5960.           seriously wrong with the memory allocation system, and all are
  5961.           fatal.
  5962.  
  5963.           ***> POPFRAME(): bad frame count
  5964.           ***> POPFRAME(): chkestk failed on entrance.
  5965.           ***> POPFRAME(): chkestk failed on exit.
  5966.           ***> POPFRAME(): empty environment stack.
  5967.           ***> POPFRAME(): stack probably bashed.
  5968.               The above three messages indicate that somehow the
  5969.           control stack got bashed. This could be due to a bad pointer
  5970.           in the virtual image somewhere, or, in some environments,
  5971.           the bad behavior of some other program in the system which
  5972.           wrote over PDLISP's stack. Consider this error fatal.
  5973.  
  5974.           ***> POPPROP: 1st arg must be a symbol.
  5975.               Only symbols have property lists. Not fatal.
  5976.  
  5977.           ***> POPUP(): bad target frame.
  5978.               The internal routine which pops the environment stack for
  5979.           THROW and ERR has detected a bad frame. Since this probably
  5980.           means that the control stack has been bashed also, you're
  5981.           dead.
  5982.  
  5983.           ***> PRNTATOM(): arg not atomic.
  5984.               Probably not fatal.
  5985.  
  5986.           ***> PRNTRSWD(): tag out of range.
  5987.               Probably fatal.
  5988.  
  5989.  
  5990.  
  5991.  
  5992.  
  5993.  
  5994.  
  5995.  
  5996.  
  5997.  
  5998.  
  5999.  
  6000.  
  6001.  
  6002.                                      - 225 -              Version 1.10
  6003.           
  6004.  
  6005.  
  6006.  
  6007.  
  6008.  
  6009.  
  6010.           PDLISP language manual               PDLISP Error Messages
  6011.           
  6012.  
  6013.  
  6014.  
  6015.  
  6016.           ***> PSHFRAME(): chkestk() failed on entrance.
  6017.           ***> PSHFRAME(): frameptr not legal
  6018.           ***> PSHFRAME(): chkestk() failed on exit.
  6019.               The system routine which establishes new environments
  6020.           has discovered an inconsistency in the environment stack.
  6021.           Probably fatal.
  6022.  
  6023.           ***> PUTD: 1st arg not a symbol.
  6024.               PUTD expects as its first argument a symbol whose
  6025.           function cell will be altered; nothing else has a function
  6026.           cell. Not fatal.
  6027.  
  6028.           ***> PUTPROP or REMPROP: invalid indicator.
  6029.               Indicators cannot be built-in symbols, such as T or NIL.
  6030.           Not fatal.
  6031.  
  6032.               The following messages are from the reader, which
  6033.           reads s-expressions from the disk or the console. Usually,
  6034.           the reader outputs the line in which the error occurred,
  6035.           and underneath the offending character or token outputs
  6036.           a carot ("^"). None of these errors are fatal.
  6037.  
  6038.           ***> READER: error in input stream.
  6039.               This message is printed out in addition to other
  6040.           error messages.
  6041.  
  6042.           ***> READER: premature end of input in file: <file name>
  6043.               The reader encountered the end of a file while it was
  6044.           in the middle of reading an s-expression.
  6045.  
  6046.           ***> READER: tried to access functional value of built-in
  6047.           symbol named: <symbol-name>
  6048.               The reader was instructed to apply a function at
  6049.           read-time, but the named symbol currently has no function
  6050.           binding.
  6051.  
  6052.           ***> READER: exceeded maximum lexical level.
  6053.               Currently, the reader permits 255 lexical levels.
  6054.  
  6055.  
  6056.  
  6057.  
  6058.  
  6059.  
  6060.  
  6061.  
  6062.  
  6063.  
  6064.  
  6065.  
  6066.  
  6067.  
  6068.                                      - 226 -              Version 1.10
  6069.           
  6070.  
  6071.  
  6072.  
  6073.  
  6074.  
  6075.  
  6076.           PDLISP language manual               PDLISP Error Messages
  6077.           
  6078.  
  6079.  
  6080.  
  6081.  
  6082.           ***> READER: atom or left paren expected.
  6083.           ***> READER: atom, left or right paren expected.
  6084.           ***> READER: right paren expected.
  6085.               The reader was in the midst of parsing an s-expression,
  6086.           and expected something different than it encountered.
  6087.  
  6088.           ***> READER: undefined sharp-sign macro.
  6089.               A sharp-sign macro which has not been implemented has
  6090.           been processed.
  6091.  
  6092.           ***> READER: identifier or string too long.
  6093.               Currently, the maximum length for a string or identifier
  6094.           is 255 characters, and cannot cross lines.
  6095.  
  6096.           ***> READER: invalid LET or LET* symbol.
  6097.               The reader expected a lexically bound symbol,
  6098.           which cannot be named one of the reserved words described
  6099.           in the first chapter of this manual.
  6100.  
  6101.           ***> REMPROP: 1st arg must be a symbol.
  6102.               Only symbols have property lists. Not fatal.
  6103.  
  6104.           ***> RESTORE: arg must be a string.
  6105.               RESTORE expects a string which it interprets to be
  6106.           the name of a virtual image file to restore. Not fatal.
  6107.  
  6108.           ***> RESTORE: environment stack probably bashed.
  6109.               After restoring a virtual image, RESTORE discovered an
  6110.           inconsistency in the environment stack. Probably fatal.
  6111.  
  6112.           ***> RETURN: unable to find enclosing block.
  6113.               Means just what it says. Look in your code to
  6114.           see if there really is a return without an enclosing
  6115.           block; if such is the case, then this error is
  6116.           probably not fatal.
  6117.  
  6118.           ***> RM or RMQ: bad argument.
  6119.           ***> RM or RMQ: <symbol name> is a directory.
  6120.           ***> RM or RMQ: <symbol name> not in current directory.
  6121.               RM and RMQ expect as arguments symbols which are in the
  6122.           current directory and which are not directories themselves.
  6123.           In order to remove directories, use RMDIR or RMDIRQ.
  6124.           Not fatal.
  6125.  
  6126.  
  6127.  
  6128.  
  6129.  
  6130.  
  6131.  
  6132.  
  6133.  
  6134.                                      - 227 -              Version 1.10
  6135.           
  6136.  
  6137.  
  6138.  
  6139.  
  6140.  
  6141.  
  6142.           PDLISP language manual               PDLISP Error Messages
  6143.           
  6144.  
  6145.  
  6146.  
  6147.  
  6148.           ***> RPATHNME(): arg not a symbol.
  6149.               RPATHNME() was passed an argument which was not a symbol,
  6150.           not fatal.
  6151.  
  6152.           ***> RPLACA: 1st arg must not be atomic.
  6153.               RPLACA expects a list or cons-cell as its first argument,
  6154.           since atoms don't have car fields to alter. Not fatal.
  6155.  
  6156.           ***> RPLACD: 1st arg is atomic.
  6157.               RPLACD expects a list or cons-cell as its first argument.
  6158.           Not fatal.
  6159.  
  6160.           ***> SAVE: arg must be a string.
  6161.               SAVE expects as its argument a string which specifies
  6162.           the name of a file on the host operating system to which
  6163.           the virtual image will be written. Not fatal.
  6164.  
  6165.           ***> scandir(): 1st arg not a directory.
  6166.               One of the internal routines inside the reader was handed
  6167.           garbage. Probably fatal.
  6168.  
  6169.           ***> scan(): directory named <directory name> does not exist.
  6170.               The reader attempted to read a symbol name containing
  6171.           a segment which should have been a directory, but which
  6172.           was not. All of the path-name segments except the last
  6173.           segment must be directories. For example, if we were to
  6174.           specify the path-name /FOO/BAR/BAZ, FOO and BAR are
  6175.           required to be directories. Not fatal.
  6176.  
  6177.           ***> scan(): path name segment does not exist.
  6178.               The reader attempted to read a symbol name containing
  6179.           a segment which does not exist. Recall that the reader only
  6180.           interns new symbols in the current directory. Not fatal.
  6181.  
  6182.           ***> scanseg(): illegal directory argument.
  6183.               The reader attempted to parse a path name containing
  6184.           a segment which is not a symbol (only symbols can be
  6185.           directories). Not fatal.
  6186.  
  6187.  
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.  
  6196.  
  6197.  
  6198.  
  6199.  
  6200.                                      - 228 -              Version 1.10
  6201.           
  6202.  
  6203.  
  6204.  
  6205.  
  6206.  
  6207.  
  6208.           PDLISP language manual               PDLISP Error Messages
  6209.           
  6210.  
  6211.  
  6212.  
  6213.  
  6214.           ***> SETATOM(): formal parameter is not a symbol.
  6215.               The part of the interpreter which sets a symbol to
  6216.           a value was handed a bad argument (such as a constant).
  6217.           Probably not fatal.
  6218.  
  6219.           ***> SETMODE: 1st arg not a symbol.
  6220.           ***> SETMODE: 2nd arg not an integer.
  6221.               SETMODE expects 2 arguments: a symbol name and
  6222.           an integer to set it to. Not fatal.
  6223.  
  6224.           ***> SETPLIST: argument must be a symbol.
  6225.               Only symbols can have property lists. Not fatal.
  6226.  
  6227.           ***> SRMDIR: the symbol <symbol name> not a directory.
  6228.               SRMDIR only works on directories. Use RM or RMQ for
  6229.           everything else. Not fatal.
  6230.  
  6231.           ***> SRMDIR: symbol <symbol name> not in current directory.
  6232.               Any directories to be removed must be an object which
  6233.           is interned in the current directory. Not fatal.
  6234.  
  6235.           ***> SRMDIR: can't remove root.
  6236.               SRMDIR is incapable of removing the root directory,
  6237.           since there are easier ways of committing suicide which
  6238.           don't require a computer. Not fatal.
  6239.  
  6240.           ***> SRMDIR: argument not a symbol.
  6241.               All directories are symbols. Not fatal.
  6242.  
  6243.           ***> STATUS: 1st arg must be an integer.
  6244.           ***> STATUS: 1st arg must be >= 0
  6245.           ***> STATUS: 2nd arg must be a symbol.
  6246.           ***> STATUS: 2nd arg must be an integer.
  6247.           ***> STATUS: 2nd arg must be a flonum.
  6248.           ***> STATUS: 2nd arg must be atomic.
  6249.           ***> STATUS: unimplemented case.
  6250.               STATUS does some type-checking of its arguments.
  6251.           The first argument must always be an integer >= 0;
  6252.           the required type of the second argument depends upon
  6253.           the value of the first argument. Not fatal.
  6254.  
  6255.  
  6256.  
  6257.  
  6258.  
  6259.  
  6260.  
  6261.  
  6262.  
  6263.  
  6264.  
  6265.  
  6266.                                      - 229 -              Version 1.10
  6267.           
  6268.  
  6269.  
  6270.  
  6271.  
  6272.  
  6273.  
  6274.           PDLISP language manual               PDLISP Error Messages
  6275.           
  6276.  
  6277.  
  6278.  
  6279.  
  6280.           ***> STRCAT: arg is not a string.
  6281.               STRCAT expects all of its arguments to be strings.
  6282.           Not fatal.
  6283.  
  6284.           ***> STRLEN: arg is not a string.
  6285.               STRLEN expects its argument to be a string.
  6286.           Not fatal.
  6287.  
  6288.           ***> SWEEP(): found system node in s-expr space.
  6289.           ***> SWEEP(): found atom with bad tag.
  6290.           ***> SWEEP(): found bad dynamic atom variant.
  6291.           ***> SWEEP(): found lexical atom with bad tag.
  6292.           ***> SWEEP(): found bad lexical atom variant.
  6293.               The sweep routine in the mark and sweep garbage
  6294.           collector found an anomaly in the virtual image.
  6295.           Treat all of these errors as fatal.
  6296.  
  6297.           ***> SYMBOL-NAME: arg not a symbol.
  6298.               SYMBOL-NAME only works with symbols. Not fatal.
  6299.  
  6300.           ***> SYSGPROP(): 1st arg must be a symbol.
  6301.               The system routine which retrieves property-value
  6302.           pairs from a property list requires a symbol as its
  6303.           first argument. Not fatal.
  6304.  
  6305.           ***> SYSNCONC(): 1st arg atomic.
  6306.           ***> SYSNCONC(): 1st arg was NIL
  6307.               The system NCONC function, which is called from
  6308.           NCONC and other places, wants all of it arguments except
  6309.           for the last one to be non-nil lists. This is because it
  6310.           bends the CDR of the last cons cell of each argument
  6311.           to point to the next one, and atoms don't have CDR fields.
  6312.           Not usually fatal.
  6313.  
  6314.           ***> SYSPPROP(): 1st arg must be a symbol.
  6315.               The system routine which puts property-value pairs on
  6316.           property lists got an argument which was not a symbol.
  6317.           Probably not fatal.
  6318.  
  6319.  
  6320.  
  6321.  
  6322.  
  6323.  
  6324.  
  6325.  
  6326.  
  6327.  
  6328.  
  6329.  
  6330.  
  6331.  
  6332.                                      - 230 -              Version 1.10
  6333.           
  6334.  
  6335.  
  6336.  
  6337.  
  6338.  
  6339.  
  6340.           PDLISP language manual               PDLISP Error Messages
  6341.           
  6342.  
  6343.  
  6344.  
  6345.  
  6346.           ***> TAGBODY: binding error.
  6347.               TAGBODY had to abort because of a binding error. Not
  6348.           fatal.
  6349.  
  6350.           ***> TAGBODY: pc is atomic.
  6351.               TAGBODY attemped to execute an atomic statement in
  6352.           a tag body. Possibly fatal.
  6353.  
  6354.           ***> TAGBODY: popframe() failed
  6355.               TAGBODY was unable to pop the environment stack upon
  6356.           exit. Probably fatal.
  6357.  
  6358.           ***> TAGBODY: fumbled a GO.
  6359.               TAGBODY was unable to execute a GO statement.
  6360.           Probably fatal.
  6361.  
  6362.           ***> TAGBODY(): tag body corrupted.
  6363.               TAGBODY detected a fault in a tag body. Probably fatal.
  6364.  
  6365.           ***> THROW: unable to throw.
  6366.           ***> THROW: unable to match throw label.
  6367.               THROW was unable to throw contol to the specified label.
  6368.           Possible fatal.
  6369.  
  6370.           ***> UPDTDCB(): dcb corrupted.
  6371.           ***> UPDTDCB(): bad directory link.
  6372.           ***> UPDTDCB(): object list arg not atomic.
  6373.           ***> UPDTDCB(): object list arg not a directory.
  6374.           ***> UPDTDCB(): bad position argument.
  6375.           ***> UPDTDCB(): error in object list.
  6376.               Any of these messages indicate the the directory
  6377.           control block system is terribly confused. All are fatal.
  6378.  
  6379.           ***> ZEROP: argument is not numeric.
  6380.               ZEROP works on numbers. Not fatal.
  6381.  
  6382.  
  6383.  
  6384.  
  6385.  
  6386.  
  6387.  
  6388.  
  6389.  
  6390.  
  6391.  
  6392.  
  6393.  
  6394.  
  6395.  
  6396.  
  6397.  
  6398.                                      - 231 -              Version 1.10
  6399.           
  6400.  
  6401.  
  6402.  
  6403.  
  6404.  
  6405.  
  6406.           PDLISP language manual               PDLISP Error Messages
  6407.           
  6408.  
  6409.  
  6410.  
  6411.  
  6412.                        This page intentionally left blank
  6413.  
  6414.  
  6415.  
  6416.  
  6417.  
  6418.  
  6419.  
  6420.  
  6421.  
  6422.  
  6423.  
  6424.  
  6425.  
  6426.  
  6427.  
  6428.  
  6429.  
  6430.  
  6431.  
  6432.  
  6433.  
  6434.  
  6435.  
  6436.  
  6437.  
  6438.  
  6439.  
  6440.  
  6441.  
  6442.  
  6443.  
  6444.  
  6445.  
  6446.  
  6447.  
  6448.  
  6449.  
  6450.  
  6451.  
  6452.  
  6453.  
  6454.  
  6455.  
  6456.  
  6457.  
  6458.  
  6459.  
  6460.  
  6461.  
  6462.  
  6463.  
  6464.                                      - 232 -              Version 1.10
  6465.           
  6466.  
  6467.  
  6468.  
  6469.  
  6470.  
  6471.  
  6472.           PDLISP language manual               PDLISP Error Messages
  6473.           
  6474.  
  6475.  
  6476.  
  6477.  
  6478.                        This page intentionally left blank
  6479.  
  6480.  
  6481.  
  6482.  
  6483.  
  6484.  
  6485.  
  6486.  
  6487.  
  6488.  
  6489.  
  6490.  
  6491.  
  6492.  
  6493.  
  6494.  
  6495.  
  6496.  
  6497.  
  6498.  
  6499.  
  6500.  
  6501.  
  6502.  
  6503.  
  6504.  
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.                                      - 233 -              Version 1.10
  6531.           
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6539.           
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.                                    Appendix C
  6550.  
  6551.                       Running PDLISP Under MS-DOS & PC-DOS
  6552.  
  6553.  
  6554.  
  6555.  
  6556.           17.1 Packing List
  6557.  
  6558.  
  6559.  
  6560.               Here is an explanation of the files on the distribution
  6561.           diskette:
  6562.  
  6563.           pdlisp.exe  -   the actual LISP interpreter
  6564.           pdload.exe  -   loads the LISP interpreter into ram
  6565.           pdinit.l    -   the LISP initialization file
  6566.           bakquote.l  -   the back-quote macro
  6567.           dirlib.l    -   library of directory functions
  6568.           debug.l     -   misc debugging functions
  6569.           examples.l  -   misc demonstration functions
  6570.           fmtio.l     -   formatted i/o, including the pretty-printer
  6571.           led.l       -   the PDLISP structure editor
  6572.           misc.l      -   miscellaneous support functions
  6573.           rudolf.l    -   property list demonstration
  6574.           test.l      -   a small test suite
  6575.  
  6576.  
  6577.  
  6578.  
  6579.           17.2 Getting Started
  6580.  
  6581.  
  6582.  
  6583.               The following instructions assume that you have
  6584.           a hard disk; instructions for floppy-based systems follow.
  6585.           Before attempting to run PDLISP, you should be familiar
  6586.           with the DOS DIR, COPY, FORMAT, and DISKCOPY commands;
  6587.           this information is available in the DOS which should
  6588.           have been provided with your system. You should also be
  6589.           familiar with some sort of text editor - the following
  6590.           is a list of the editors which have successfully been used
  6591.           with PDLISP, but any should work:
  6592.  
  6593.  
  6594.  
  6595.  
  6596.                                      - 234 -              Version 1.10
  6597.           
  6598.  
  6599.  
  6600.  
  6601.  
  6602.  
  6603.  
  6604.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6605.           
  6606.  
  6607.  
  6608.  
  6609.                   MINCE      (Mark of the Unicorn)
  6610.                   SEE        (C-WARE)
  6611.                   Wordstar   (Micropro International)
  6612.                   VEDIT      (Compuview)
  6613.                   EDLIN      (Provided with DOS)
  6614.  
  6615.           step 1:
  6616.                   Prepare your system by removing any ram-disks
  6617.                   which you may have which are located in main memory.
  6618.                   PDLISP is pretty memory hungry, but you can run
  6619.                   comfortably in a 512k system. With less memory,
  6620.                   you may still be able to run the interpreter,
  6621.                   but you may not be able to load all of the utilities.
  6622.  
  6623.           step 2:
  6624.                   Add/Modify the following lines in your CONFIG.SYS
  6625.                   file:
  6626.  
  6627.                   FILES=20
  6628.                   BUFFERS=12
  6629.  
  6630.           step 3:
  6631.                   Put all of the above files in the same directory.
  6632.  
  6633.           step 4:
  6634.                   Type "PDLOAD"
  6635.  
  6636.           After about a minute, the "/USR/LOGIN->" prompt should
  6637.           come up. If the prompt did not come up, or if you get
  6638.           a error message, see the error message section for
  6639.           MS-DOS, below.
  6640.  
  6641.           step 5:
  6642.                   At the prompt, save the virtual image on disk,
  6643.                   as shown below:
  6644.  
  6645.           /USR/LOGIN->(save "pd.img")        <CR>
  6646.  
  6647.           step 6:
  6648.                   After a bit of intensive disk activity,
  6649.                   the prompt should come back up.
  6650.  
  6651.           The   next   time  that  you  wish  to  run  PDLISP,   type
  6652.           "PDLOAD pd.img"  at  the DOS command level to restore  the
  6653.           virtual image which you saved in step 4. The loading process
  6654.           should only take a few seconds, and then  the "/USR/LOGIN->"
  6655.           prompt should come up. 
  6656.  
  6657.           
  6658.  
  6659.  
  6660.  
  6661.  
  6662.                                      - 235 -              Version 1.10
  6663.           
  6664.  
  6665.  
  6666.  
  6667.  
  6668.  
  6669.  
  6670.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6671.           
  6672.  
  6673.  
  6674.  
  6675.  
  6676.  
  6677.  
  6678.  
  6679.           17.3 Running PDLISP on a Floppy-Only System
  6680.  
  6681.  
  6682.  
  6683.           step 1:
  6684.                   Format a blank disk with the "/S" option, which puts
  6685.                   a copy of MS-DOS on it, so that you can boot from it.
  6686.                   Label the new disk "PDLISP running disk" with a felt-
  6687.                   tipped pen.
  6688.  
  6689.           step 2:
  6690.                   Format another blank disk without using the "/S"
  6691.                   option, and label this disk the "PDLISP virtual
  6692.                   image disk" with a felt-tipped pen.
  6693.  
  6694.           step 3:
  6695.                   Copy all of the files on the PDLISP distribution
  6696.                   disk onto the PDLISP running disk, using the DOS
  6697.                   "COPY" command. Put your original PDLISP master
  6698.                   diskette in a safe place. Never copy anything
  6699.                   onto the master diskette.
  6700.  
  6701.           step 4:
  6702.                   Copy your existing CONFIG.SYS file over to the running
  6703.                   diskette, and add or modify the following lines:
  6704.           
  6705.                   FILES=20
  6706.                   BUFFERS=12
  6707.  
  6708.           step 5:
  6709.                   Check how much room you have on the new disk. If your
  6710.                   favorite text editor is relatively small, transfer
  6711.                   it to this disk. Otherwise, you will have to put
  6712.                   it on another floppy. Be sure that after everything
  6713.                   is on the running disk, that you have at least 96k bytes
  6714.                   of free space. PDLISP uses this space to swap part
  6715.                   its the memory image out to disk when executing
  6716.                   the text editor and other programs.
  6717.           
  6718.           step 6:
  6719.                   Put the running diskette into drive "A", and boot from
  6720.                   it (hit control-alt-delete). Put the virtual image
  6721.                   diskette in drive "B" if you have a two-drive machine.
  6722.                   Use the DOS "DIR" command to examine the contents
  6723.                   of both floppies to insure that both are good and
  6724.                   contain the files which you want. The virtual image
  6725.  
  6726.  
  6727.  
  6728.                                      - 236 -              Version 1.10
  6729.           
  6730.  
  6731.  
  6732.  
  6733.  
  6734.  
  6735.  
  6736.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6737.           
  6738.  
  6739.  
  6740.  
  6741.                   diskette should be empty at this time. Take care not
  6742.                   to remove the running diskette from drive "A" unless
  6743.                   specifically asked to by MS-DOS or PDLISP; MS-DOS
  6744.                   has a nasty habit of bashing directories on diskettes
  6745.                   which have been inserted without its knowledge.
  6746.  
  6747.           step 7:
  6748.                   Type "PDLOAD". After about a minute, the "/USR/LOGIN->"
  6749.                   prompt should come up. If the prompt did not come up,
  6750.                   or if you get a error message, see the error message
  6751.                   section for MS-DOS, below.
  6752.  
  6753.           step 8:
  6754.                   At the prompt, save the virtual image on disk,
  6755.                   as shown below:
  6756.  
  6757.           /USR/LOGIN->(save "b:pd.img")        <CR>
  6758.  
  6759.           step 9:
  6760.                   After a bit of intensive disk activity,
  6761.                   the prompt should come back up.
  6762.  
  6763.           The  next  time   that   you   wish  to  run  PDLISP,  type
  6764.           "PDLOAD b:pd.img" at the DOS  command level to restore the
  6765.           virtual image which you saved in step 4. The loading process
  6766.           should only take a few seconds,  and then the "/USR/LOGIN->"
  6767.           prompt should come up. 
  6768.  
  6769.           
  6770.  
  6771.  
  6772.  
  6773.  
  6774.           17.4 Editing of Initialization Files
  6775.  
  6776.  
  6777.           If you should wish to edit any of  the  initialization files
  6778.           (i.e., any of the .L files in  the  packing  list), then you
  6779.           should  reconstruct  the  virtual  image,  instead  of  just
  6780.           reading them in after restoring another virtual image.  That
  6781.           is, invoke PDLISP again by typing:
  6782.  
  6783.  
  6784.           PDLOAD
  6785.  
  6786.           at the operating system prompt. 
  6787.  
  6788.  
  6789.  
  6790.  
  6791.  
  6792.  
  6793.  
  6794.                                      - 237 -              Version 1.10
  6795.           
  6796.  
  6797.  
  6798.  
  6799.  
  6800.  
  6801.  
  6802.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6803.           
  6804.  
  6805.  
  6806.  
  6807.           17.5 Error Messages on MS-DOS
  6808.  
  6809.  
  6810.           Format  of  error  messages for MS-DOS is identical  to  the
  6811.           format of other error messages.  Messages peculiar to MS-DOS
  6812.           are:
  6813.  
  6814.  
  6815.           ***> clrspace(): prstmem() has not been called.
  6816.               The part of the interpreter which clears out space for
  6817.           SHELL is hopelessly confused. Fatal.
  6818.  
  6819.           ***> longjmp(): bad checksum in environment block.
  6820.           ***> longjmp(): bad stack pointer.
  6821.               An internal routine which does the final transfer
  6822.           of control for THROW and ERR has detected a fault
  6823.           in the stack. Fatal.
  6824.  
  6825.           ***> mark(): out of stack space.
  6826.               The mark routine in the mark & sweep garbage collector
  6827.           has exhausted the stack. Fatal.
  6828.  
  6829.           ***> mark(): found unmarked system atom.
  6830.           ***> mark(): free atom or node list corrupted.
  6831.           ***> mark(): found unmarked system atom.
  6832.           ***> mark(): found illegal tag value.
  6833.               All of these error messages indicate that the mark routine
  6834.           in the mark & sweep garbage collector found an inconsistency
  6835.           in the virtual image. All of these errors are usually fatal.
  6836.           Please let me know if any of these errors occur, since it
  6837.           is possible that it is my fault.
  6838.  
  6839.           ***> SHELL: can't create swap file.
  6840.               For some reason, SHELL can't get DOS to create a swap
  6841.           file. The usual cause of this error is that there is not
  6842.           enough room on the disk. Possibly fatal if the DOS is broken.
  6843.  
  6844.           ***> palloc(): prstmem() has not been called.
  6845.               The memory allocator inside the interpreter is confused.
  6846.           Treat as fatal.
  6847.  
  6848.  
  6849.  
  6850.  
  6851.  
  6852.  
  6853.  
  6854.  
  6855.  
  6856.  
  6857.  
  6858.  
  6859.  
  6860.                                      - 238 -              Version 1.10
  6861.           
  6862.  
  6863.  
  6864.  
  6865.  
  6866.  
  6867.  
  6868.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6869.           
  6870.  
  6871.  
  6872.  
  6873.  
  6874.           ***> prstmem(): error returned from DOS
  6875.               The memory allocator inside the interpreter was unable
  6876.           to get DOS to cooperate. This is indicative of a trashed
  6877.           memory image, or that DOS is broken. Treat as fatal, and
  6878.           reboot.
  6879.  
  6880.           ***> RESTORE: cannot open file.
  6881.               RESTORE could not find the virtual image file specified.
  6882.           Not fatal.
  6883.  
  6884.           ***> RESTORE: bad pointer, cannot reconstruct.
  6885.           ***> RESTORE: bad tag in node.
  6886.           ***> RESTORE: fell through rstdseg() in restore()
  6887.           ***> RESTORE: illegal segment tag.
  6888.               RESTORE has detected a fault in the memory image being
  6889.           restored. See the notes below on restrictions of transfer
  6890.           of virtual image files between machines under MS-DOS. Fatal.
  6891.  
  6892.           ***> SAVE: unable to create the file <file name>
  6893.               SAVE could not create the virtual image file. Perhaps
  6894.           the file name you gave it was illegal under MS-DOS? Not
  6895.           fatal.
  6896.  
  6897.           ***> SAVE: error writing out data segment.
  6898.           ***> SAVE: unable to write out stack segment.
  6899.           ***> SAVE: unable to write out s-expression space.
  6900.               SAVE was unable to write out the virtual image, possibly
  6901.           because not enough room existed on the disk. Not fatal.
  6902.  
  6903.           ***> swpspace(): unable to delete swap file.
  6904.               The swapper was unable to remove the temporary file
  6905.           which it created. Possibly fatal, and indicates that something
  6906.           about DOS is flakey.
  6907.  
  6908.           ***> unable to allocate RAM for segment.
  6909.               The memory allocator was unable to allocate memory.
  6910.           Possibly fatal.
  6911.  
  6912.  
  6913.  
  6914.  
  6915.  
  6916.  
  6917.  
  6918.  
  6919.  
  6920.  
  6921.  
  6922.  
  6923.  
  6924.  
  6925.  
  6926.                                      - 239 -              Version 1.10
  6927.           
  6928.  
  6929.  
  6930.  
  6931.  
  6932.  
  6933.  
  6934.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  6935.           
  6936.  
  6937.  
  6938.  
  6939.  
  6940.           ***> PDLISP.EXE: must run PDLOAD.EXE first!
  6941.               PDLISP.EXE cannot be run by itself; run PDLOAD.EXE with
  6942.           PDLISP.EXE in the same directory, and PDLOAD.EXE will automatically
  6943.           load PDLISP.EXE into memory and execute it. Fatal.
  6944.  
  6945.           ***> PDLOAD: memory control blocks bashed, or not enough RAM.
  6946.           ***> PDLOAD: load address too high. aborting...
  6947.           ***> PDLOAD: unable to allocate enough RAM.
  6948.  
  6949.               All of these messages indicate that something is wrong
  6950.           with the initial memory configuration, and that PDLOAD is
  6951.           unable to set up memory properly.
  6952.  
  6953.               The first message indicates that you either don't have
  6954.           enough RAM (512k recommended), or that something was wrong
  6955.           with the DOS memory allocator. Try rebooting and see if
  6956.           that corrects the problem.
  6957.  
  6958.               The second message indicates that you have too much
  6959.           junk in memory before running PDLOAD. At the current time,
  6960.           PDLOAD attempts to locate PDLISP at 96k (decimal). This
  6961.           means that the DOS, any device drivers you may have, and
  6962.           PDLOAD must fit beneath 96k. Things that should be thrown
  6963.           out include PROKEY and SIDEKICK type prorams, since they
  6964.           bump the load address up.
  6965.  
  6966.               I am working on a command-line switch to allow
  6967.           selection of the load address at run-time. If you are
  6968.           unable to get PDLISP to work after throwing everything
  6969.           non-essential out, give me a call, and I will send you
  6970.           out an early release of the command-line switch version.
  6971.  
  6972.               The last error message simply means that you haven't
  6973.           got enough RAM, or at least that DOS doesn't think that
  6974.           you have enough. If you have a PC or clone, check that
  6975.           the switches on the motherboard correspond to the actual
  6976.           amount of RAM in the machine. Also, try rebooting, and
  6977.           see if that cures the problem.
  6978.  
  6979.           ***> xtlt(): bad pointer offset.
  6980.               The internal routine which translates pointers after
  6981.           a RESTORE found a pointer which does not appear to be
  6982.           legal. Probably fatal.
  6983.  
  6984.  
  6985.  
  6986.  
  6987.  
  6988.  
  6989.  
  6990.  
  6991.  
  6992.                                      - 240 -              Version 1.10
  6993.           
  6994.  
  6995.  
  6996.  
  6997.  
  6998.  
  6999.  
  7000.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7001.           
  7002.  
  7003.  
  7004.  
  7005.  
  7006.                        This page intentionally left blank
  7007.  
  7008.  
  7009.  
  7010.  
  7011.  
  7012.  
  7013.  
  7014.  
  7015.  
  7016.  
  7017.  
  7018.  
  7019.  
  7020.  
  7021.  
  7022.  
  7023.  
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  
  7029.  
  7030.  
  7031.  
  7032.  
  7033.  
  7034.  
  7035.  
  7036.  
  7037.  
  7038.  
  7039.  
  7040.  
  7041.  
  7042.  
  7043.  
  7044.  
  7045.  
  7046.  
  7047.  
  7048.  
  7049.  
  7050.  
  7051.  
  7052.  
  7053.  
  7054.  
  7055.  
  7056.  
  7057.  
  7058.                                      - 241 -              Version 1.10
  7059.           
  7060.  
  7061.  
  7062.  
  7063.  
  7064.  
  7065.  
  7066.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7067.           
  7068.  
  7069.  
  7070.  
  7071.  
  7072.  
  7073.  
  7074.  
  7075.           17.6 Peculiarities
  7076.  
  7077.  
  7078.           Since MS-DOS runs in an environment which does  not  have  a
  7079.           memory management unit (MMU), PDLISP has a few restrictions
  7080.           as to its operation concerning initial memory configuration,
  7081.           and the restoration of virtual images.  For MS-DOS,  PDLISP
  7082.           is designed to load at a fixed address in  RAM.  The program
  7083.           which accomplishes this is the  loader,  PDLOAD.EXE.  After
  7084.           initial  check-out  of the environment, PDLOAD.EXE loads in
  7085.           the PDLISP kernel (comprising the file PDLISP.EXE).
  7086.  
  7087.             Some restrictions  apply  concerning  transfer  of virtual
  7088.           images between machines.  For  a  machine to be able to boot
  7089.           up a virtual image all of the following must be true:
  7090.  
  7091.  
  7092.           (1) The virtual image must have been created using the same
  7093.               version of the interpreter as the one under which the
  7094.               image is being restored. So, if the image file was created
  7095.               using v1.0, then it can only be restored using v1.0.
  7096.  
  7097.           (2) The load addresses of the two interpreters must be
  7098.               the same. Currently, PDLOAD.EXE always locates
  7099.               PDLISP.EXE at 96k(decimal). We're planning to
  7100.               implement a command-line switch to enable the user
  7101.               to specify the load address.
  7102.           
  7103.           (3) The machine attempting to restore the virtual image
  7104.               must have as much memory as the one which created
  7105.               the image. I will probably be able to soften this
  7106.               requirement in a future release, as long as the machine
  7107.               doing the RESTORE has enough RAM for all of the allocated
  7108.               segments of the image.
  7109.  
  7110.  
  7111.  
  7112.  
  7113.  
  7114.  
  7115.  
  7116.  
  7117.  
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.                                      - 242 -              Version 1.10
  7125.           
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7133.           
  7134.  
  7135.  
  7136.  
  7137.  
  7138.  
  7139.  
  7140.  
  7141.           17.7 Memory Configuration under MS-DOS
  7142.  
  7143.  
  7144.  
  7145.               The following is a memory map of the way that PDLOAD sets up
  7146.           memory:
  7147.  
  7148.           -------------------------
  7149.           | DOS loader            |
  7150.           ------------------------- <------ 1600 bytes below top of RAM
  7151.           | HEAP 3 (grows down)   |
  7152.           |                       |
  7153.           |                       |
  7154.           |                       |
  7155.           |                       |
  7156.           | HEAP 1 (grows up)     |
  7157.           ------------------------- <------ STACKBASE + 64k
  7158.           | control stack         |
  7159.           | (grows down)          |
  7160.           |                       |
  7161.           |                       |
  7162.           | protection stack      |
  7163.           | (grows upwards)       |
  7164.           ------------------------- <------ STACKBASE (96k + kernel size)
  7165.           |                       |
  7166.           | PDLISP kernel        |
  7167.           |                       |
  7168.           ------------------------- <------ load address (typically 96k)
  7169.           | communication area    |
  7170.           -------------------------
  7171.           |                       |
  7172.           |                       |
  7173.           | HEAP 2 (grows up)     |
  7174.           ------------------------- <------ approx 12k above PSP of loader
  7175.           |                       |
  7176.           | PDLOAD loader         |
  7177.           |                       |
  7178.           ------------------------- <------ PSP of PDLOAD.EXE
  7179.           |                       |
  7180.           | DOS kernel            |
  7181.           |                       |
  7182.           -------------------------
  7183.  
  7184.  
  7185.  
  7186.  
  7187.  
  7188.  
  7189.  
  7190.                                      - 243 -              Version 1.10
  7191.           
  7192.  
  7193.  
  7194.  
  7195.  
  7196.  
  7197.  
  7198.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7199.           
  7200.  
  7201.  
  7202.  
  7203.           From the bottom up, we have the following regions in memory:
  7204.  
  7205.             At the base of ram is the DOS kernel and whatever programs
  7206.           and  device drivers have been loaded by the  DOS,  including
  7207.           those which terminate with  a  "terminate and stay resident"
  7208.           call.  Print spoolers and  "desktop" utilities fit into this
  7209.           category. 
  7210.  
  7211.             Next, we have PDLOAD.EXE, which is the first Cybermetrics
  7212.           program   to   get   control.    It   allocates  memory  for
  7213.           PDLISP.EXE, which is the PDLISP kernel, and sets up memory
  7214.           configuration  information in the communication area,  which
  7215.           resides just beneath the  PSP  (program  segment  prefix) of
  7216.           PDLISP.EXE. The  communication  area  is  described below. 
  7217.           After loading and setting up this information, PDLOAD loads
  7218.           and executes PDLISP.EXE using  the  DOS  exec  call.   When
  7219.           PDLISP.EXE  terminates execution, PDLOAD terminates  also,
  7220.           passing a termination code back to DOS.
  7221.  
  7222.             Above PDLOAD.EXE  and  the  communication  area,  we have
  7223.           HEAP2, which uses up the "gap" between PDLOAD and  PDLISP.
  7224.           This heap may or may not exist, depending upon the size  of
  7225.           the gap. 
  7226.  
  7227.             Next comes the "communication  area",  which  is  used for
  7228.           communication   between  the  loader  and  the   interpreter
  7229.           kernel.   Its contents can  be  examined  using  the  MEMMAP
  7230.           function. 
  7231.  
  7232.             PDLISP.EXE, the interpreter kernel,  is loaded next.  Its
  7233.           base address, also called  its  PSP  (for  "Program  Segment
  7234.           Prefix") is normally 96k decimal. 
  7235.  
  7236.             Above the PDLISP  kernel  itself are two stacks which run
  7237.           towards each other.  The stack which runs up  is  called the
  7238.           "protection  stack",  because  it   is   used   to   protect
  7239.           intermediate  results   from   the   mark  &  sweep  garbage
  7240.           collector.  The stack which runs down is the  control  stack
  7241.           which  is  used by  the  kernel  itself.   The  "environment
  7242.           stack", which can be  examined  by the various BAKTRACE-type
  7243.           functions is  embedded  inside  this  stack  for  efficiency
  7244.           reasons.  Normally, under MS-DOS,  the  total space for this
  7245.           combined stack area is 64k bytes. 
  7246.  
  7247.             Next comes HEAP1, also  called  the  "primary  heap."  All
  7248.           non-atomic nodes are allocated from this heap.  This heap is
  7249.           allocated in 4k-byte "chunks", growing upwards. 
  7250.  
  7251.  
  7252.  
  7253.  
  7254.  
  7255.  
  7256.                                      - 244 -              Version 1.10
  7257.           
  7258.  
  7259.  
  7260.  
  7261.  
  7262.  
  7263.  
  7264.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7265.           
  7266.  
  7267.  
  7268.  
  7269.           Finally, HEAP3 is located just below the MS-DOS loader (used
  7270.           by  the  MS-DOS   EXEC   call).    This  heap  is  really  a
  7271.           continuation of HEAP2, in that  the  same  kinds  of objects
  7272.           (symbols,  arrays, and miscellaneous objects) are  allocated
  7273.           from HEAP2 and HEAP3.
  7274.  
  7275.             The following function description is unique to MS-DOS:
  7276.  
  7277.  
  7278.           MEMMAP              CSUBR       (&OPTIONAL X)
  7279.  
  7280.           Produces a report of memory usage on the console. Two report
  7281.           formats are provided; if X is absent or not EQL to 1, then
  7282.           a summary report is generated, containing general information
  7283.           as to the current memory configuration. If X is present and
  7284.           EQ to 1, then all of the information in the summary report
  7285.           is provided as well as a map of each memory "segment".
  7286.           Segments are 4k-byte blocks of memory which are designated
  7287.           as described under the description of the ALLOC function.
  7288.  
  7289.           
  7290.  
  7291.  
  7292.  
  7293.  
  7294.  
  7295.  
  7296.  
  7297.  
  7298.  
  7299.  
  7300.  
  7301.  
  7302.  
  7303.  
  7304.  
  7305.  
  7306.  
  7307.  
  7308.  
  7309.  
  7310.  
  7311.  
  7312.  
  7313.  
  7314.  
  7315.  
  7316.  
  7317.  
  7318.  
  7319.  
  7320.  
  7321.  
  7322.                                      - 245 -              Version 1.10
  7323.           
  7324.  
  7325.  
  7326.  
  7327.  
  7328.  
  7329.  
  7330.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7331.           
  7332.  
  7333.  
  7334.  
  7335.  
  7336.                        This page intentionally left blank
  7337.  
  7338.  
  7339.  
  7340.  
  7341.  
  7342.  
  7343.  
  7344.  
  7345.  
  7346.  
  7347.  
  7348.  
  7349.  
  7350.  
  7351.  
  7352.  
  7353.  
  7354.  
  7355.  
  7356.  
  7357.  
  7358.  
  7359.  
  7360.  
  7361.  
  7362.  
  7363.  
  7364.  
  7365.  
  7366.  
  7367.  
  7368.  
  7369.  
  7370.  
  7371.  
  7372.  
  7373.  
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  
  7379.  
  7380.  
  7381.  
  7382.  
  7383.  
  7384.  
  7385.  
  7386.  
  7387.  
  7388.                                      - 246 -              Version 1.10
  7389.           
  7390.  
  7391.  
  7392.  
  7393.  
  7394.  
  7395.  
  7396.           PDLISP language manual       Running PDLISP Under MS-DOS & PC-DOS
  7397.           
  7398.  
  7399.  
  7400.  
  7401.  
  7402.                        This page intentionally left blank
  7403.  
  7404.  
  7405.  
  7406.  
  7407.  
  7408.  
  7409.  
  7410.  
  7411.  
  7412.  
  7413.  
  7414.  
  7415.  
  7416.  
  7417.  
  7418.  
  7419.  
  7420.  
  7421.  
  7422.  
  7423.  
  7424.  
  7425.  
  7426.  
  7427.  
  7428.  
  7429.  
  7430.  
  7431.  
  7432.  
  7433.  
  7434.  
  7435.  
  7436.  
  7437.  
  7438.  
  7439.  
  7440.  
  7441.  
  7442.  
  7443.  
  7444.  
  7445.  
  7446.  
  7447.  
  7448.  
  7449.  
  7450.  
  7451.  
  7452.  
  7453.  
  7454.                                      - 247 -              Version 1.10
  7455.           
  7456.  
  7457.  
  7458.  
  7459.  
  7460.  
  7461.  
  7462.           PDLISP language manual           Running PDLISP Under UNIX
  7463.           
  7464.  
  7465.  
  7466.  
  7467.  
  7468.  
  7469.  
  7470.  
  7471.  
  7472.  
  7473.                                    Appendix D
  7474.  
  7475.                            Running PDLISP Under UNIX
  7476.  
  7477.  
  7478.  
  7479.           This  section  will  be added when PDLISP is  released  for
  7480.           UNIX.
  7481.  
  7482.  
  7483.  
  7484.  
  7485.  
  7486.  
  7487.  
  7488.  
  7489.  
  7490.  
  7491.  
  7492.  
  7493.  
  7494.  
  7495.  
  7496.  
  7497.  
  7498.  
  7499.  
  7500.  
  7501.  
  7502.  
  7503.  
  7504.  
  7505.  
  7506.  
  7507.  
  7508.  
  7509.  
  7510.  
  7511.  
  7512.  
  7513.  
  7514.  
  7515.  
  7516.  
  7517.  
  7518.  
  7519.  
  7520.                                      - 248 -              Version 1.10
  7521.           
  7522.  
  7523.  
  7524.  
  7525.  
  7526.  
  7527.  
  7528.           PDLISP language manual           Running PDLISP Under UNIX
  7529.           
  7530.  
  7531.  
  7532.  
  7533.  
  7534.                        This page intentionally left blank
  7535.  
  7536.  
  7537.  
  7538.  
  7539.  
  7540.  
  7541.  
  7542.  
  7543.  
  7544.  
  7545.  
  7546.  
  7547.  
  7548.  
  7549.  
  7550.  
  7551.  
  7552.  
  7553.  
  7554.  
  7555.  
  7556.  
  7557.  
  7558.  
  7559.  
  7560.  
  7561.  
  7562.  
  7563.  
  7564.  
  7565.  
  7566.  
  7567.  
  7568.  
  7569.  
  7570.  
  7571.  
  7572.  
  7573.  
  7574.  
  7575.  
  7576.  
  7577.  
  7578.  
  7579.  
  7580.  
  7581.  
  7582.  
  7583.  
  7584.  
  7585.  
  7586.                                      - 249 -              Version 1.10
  7587.           
  7588.  
  7589.  
  7590.  
  7591.  
  7592.  
  7593.  
  7594.           PDLISP language manual           Running PDLISP Under UNIX
  7595.           
  7596.  
  7597.  
  7598.  
  7599.  
  7600.                        This page intentionally left blank
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.  
  7612.  
  7613.  
  7614.  
  7615.  
  7616.  
  7617.  
  7618.  
  7619.  
  7620.  
  7621.  
  7622.  
  7623.  
  7624.  
  7625.  
  7626.  
  7627.  
  7628.  
  7629.  
  7630.  
  7631.  
  7632.  
  7633.  
  7634.  
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.                                      - 250 -              Version 1.10
  7653.           
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.           PDLISP language manual           Running PDLISP Under UNIX
  7661.           
  7662.  
  7663.  
  7664.  
  7665.  
  7666.                        This page intentionally left blank
  7667.  
  7668.  
  7669.  
  7670.  
  7671.  
  7672.  
  7673.  
  7674.  
  7675.  
  7676.  
  7677.  
  7678.  
  7679.  
  7680.  
  7681.  
  7682.  
  7683.  
  7684.  
  7685.  
  7686.  
  7687.  
  7688.  
  7689.  
  7690.  
  7691.  
  7692.  
  7693.  
  7694.  
  7695.  
  7696.  
  7697.  
  7698.  
  7699.  
  7700.  
  7701.  
  7702.  
  7703.  
  7704.  
  7705.  
  7706.  
  7707.  
  7708.  
  7709.  
  7710.  
  7711.  
  7712.  
  7713.  
  7714.  
  7715.  
  7716.  
  7717.  
  7718.                                      - 251 -              Version 1.10
  7719.           
  7720.  
  7721.  
  7722.  
  7723.  
  7724.  
  7725.  
  7726.           PDLISP language manual           Running PDLISP Under UNIX
  7727.           
  7728.  
  7729.  
  7730.  
  7731.  
  7732.                        This page intentionally left blank
  7733.  
  7734.  
  7735.  
  7736.  
  7737.  
  7738.  
  7739.  
  7740.  
  7741.  
  7742.  
  7743.  
  7744.  
  7745.  
  7746.  
  7747.  
  7748.  
  7749.  
  7750.  
  7751.  
  7752.  
  7753.  
  7754.  
  7755.  
  7756.  
  7757.  
  7758.  
  7759.  
  7760.  
  7761.  
  7762.  
  7763.  
  7764.  
  7765.  
  7766.  
  7767.  
  7768.  
  7769.  
  7770.  
  7771.  
  7772.  
  7773.  
  7774.  
  7775.  
  7776.  
  7777.  
  7778.  
  7779.  
  7780.  
  7781.  
  7782.  
  7783.  
  7784.                                      - 252 -              Version 1.10
  7785.           
  7786.  
  7787.  
  7788.  
  7789.  
  7790.  
  7791.  
  7792.           PDLISP language manual                        LISP Glossary
  7793.           
  7794.  
  7795.  
  7796.  
  7797.  
  7798.  
  7799.  
  7800.  
  7801.  
  7802.  
  7803.                                    Appendix E
  7804.  
  7805.                                   LISP Glossary
  7806.  
  7807.  
  7808.  
  7809.             ATOM - either a symbol, string, or number. 
  7810.  
  7811.             AUTOMAGICALLY - when a program behaves in  an obvious way,
  7812.           but  its  implementation is not obvious or trivial.  As  in,
  7813.           "When you  change  a  number  in window A, the corresponding
  7814.           result in window B automagically changes." 
  7815.  
  7816.             BINDING  -  The mechanism  by  which  variable  names  are
  7817.           associated with their values.  Most LISPs  are characterized
  7818.           by   having   "dynamic   binding",  which  means  that  this
  7819.           association  can  change  during  run-time,  as  opposed  to
  7820.           languages which have "static binding", where the association
  7821.           is  fixed at compile-time.  C, Pascal, and PL/1 are examples
  7822.           of  languages  which  utilize static binding.  PDLISP  (and
  7823.           Common LISP) utilize both static and dynamic binding.   This
  7824.           machanism  is  often called "scoping". See  Allen[1978]  for
  7825.           more info. 
  7826.  
  7827.             BRIEFCASE (verb or noun) - To cause to magically appear in
  7828.           one's briefcase.  As in,  "I  don't know what happened, this
  7829.           gallium  arsenide  68020  just appeared in my briefcase  one
  7830.           day," or, "He briefcased a VAX 11/780."
  7831.  
  7832.             CAR  and  CDR - (1) Mnemonics dating back to the  earliest
  7833.           LISP implementation on IBM equipment.  Each non-atomic  node
  7834.           consisted  of  two parts, which conveniently resided in  one
  7835.           machine word.  CAR and  CDR  were  assembler mnemonics which
  7836.           corresponded to  machine instructions to extract these parts
  7837.           of  a  word.   CAR  stands for "Contents of Address part  of
  7838.           Register", and CDR stands for "Contents of Decrement part of
  7839.           Register." (2) to proceed to the next item on an agenda. 
  7840.  
  7841.             COMMON LISP - A new dialect of LISP which  is  supposed to
  7842.           reconcile the various dialects  (FRANZ,  MACLISP, INTERLISP,
  7843.           etc) of modern LISP by defining  a  subset  which all of the
  7844.           MACLISP decendants have in common.  Time will tell  if  this
  7845.           effort is to be successful. 
  7846.  
  7847.  
  7848.  
  7849.  
  7850.                                      - 253 -              Version 1.10
  7851.           
  7852.  
  7853.  
  7854.  
  7855.  
  7856.  
  7857.  
  7858.           PDLISP language manual                        LISP Glossary
  7859.           
  7860.  
  7861.  
  7862.  
  7863.             CRUFTY - Put together  in a slovenly or unsystematic way. 
  7864.           Some people spell this word as "KRUFTY".
  7865.  
  7866.             ENVIRONMENT  -  The  term used in  LISP  to  describe  the
  7867.           current  state of the virtual machine.  In particular,  this
  7868.           term  is  often  used  to  refer   to  the  current  binding
  7869.           environment.   See  Allen[1978]  and  Baker[1982]  for  more
  7870.           info. 
  7871.  
  7872.             ENVIRONMENT FILE - A text file which, by  being  read  in,
  7873.           allows  the  host  interpreter  to   emulate   another  LISP
  7874.           dialect.   For  example, one might load an environment  file
  7875.           into a Franz LISP interpreter to emulate  MacLISP.  See  the
  7876.           newsletter ("/SYS/NEWS") for more information on environment
  7877.           files which are available for PDLISP.
  7878.  
  7879.             EVAL-LISP - A  type  of  LISP  interpreter  which does not
  7880.           quote  its  top-level  arguments.  PDLISP, as well as  most
  7881.           other modern LISP dialects, are EVAL-LISPS.
  7882.  
  7883.             EVAL-QUOTE LISP - a now largely extinct LISP dialect which
  7884.           quoted its top-level arguments.   See Weissman [1967] for an
  7885.           example of an eval-quote environment. 
  7886.  
  7887.             EXPR  - A function type in MACLISP which is equivalent  to
  7888.           LAMBDA in PDLISP and most other LISPs.
  7889.  
  7890.             FEXPR - A function type in MACLISP which is equivalent  to
  7891.           NLAMBDA in PDLISP and most other LISPs.
  7892.  
  7893.             FIXNUM - equivalent to INTEGER in Common LISP and PDLISP.
  7894.           Before Common, all LISPs called "integers" "fixnums".
  7895.  
  7896.             FLOAT - a floating point number. 
  7897.  
  7898.             FLONUM - equivalent to FLOAT in Common  Lisp  and PDLISP.
  7899.           Before Common, most LISPs called "floats" "flonums".
  7900.  
  7901.             FOO  -   the   first   meta-syntactic   variable   in  the
  7902.           meta-language  in  which all LISP manuals are written.   The
  7903.           second and third meta-syntactic variables are BAR and BAZ.
  7904.  
  7905.             FORM - an s-expression which can be evaluated. 
  7906.  
  7907.             FRANZ LISP - a LISP interpreter  on  UNIX which originated
  7908.           from UC Berkeley and Carnegie-Mellon. Franz LISP is a direct
  7909.           descendant  of  Harvard PDP-11  LISP,  but  Franz  LISP  has
  7910.           evolved towards MacLISP and LISP Machine LISP.
  7911.  
  7912.             HACKER  - (1) One who constructs furniture with  an  axe. 
  7913.  
  7914.  
  7915.  
  7916.                                      - 254 -              Version 1.10
  7917.           
  7918.  
  7919.  
  7920.  
  7921.  
  7922.  
  7923.  
  7924.           PDLISP language manual                        LISP Glossary
  7925.           
  7926.  
  7927.  
  7928.  
  7929.           (2) A  programmer  or engineer whose enthusiasm for his work
  7930.           enables  him  to  transcend   difficult  obstacles.   (3)  A
  7931.           programmer who has acquired  an  expert level of proficiency
  7932.           in  a  particular  language,  operating  system,  or set  of
  7933.           programs, as in "He is a real LISP hacker."  (4) A malicious
  7934.           prankster  who has a preference for penetrating security  in
  7935.           time-sharing systems, as in "We put a gateway computer in to
  7936.           keep out hackers." 
  7937.  
  7938.             HYPERWARE - software which exists exclusively in the minds
  7939.           of some marketing executives. 
  7940.  
  7941.             INTERLISP  -  One  of  the  principle  dialects  of  LISP,
  7942.           developed at Xerox Palo  Alto Research Center (called PARC).
  7943.           INTERLISP is marked by several interesting characteristics:
  7944.  
  7945.             (1) Programs are almost  always dealt with in s-expression
  7946.           space, and  heavy  usage  is  made  of  structure editors or
  7947.           similar  tools.   This  contrasts  heavily  with the MACLISP
  7948.           philosophy of viewing programs  as  textual  entities off on
  7949.           disk in a file. 
  7950.  
  7951.             (2) Scoping is dynamic, which ties in with (1), above. 
  7952.  
  7953.             (3)  DWIM,  which stands for "Do What I Mean"  acts  as  a
  7954.           "programmer's   apprentice"   and   automatically   corrects
  7955.           programming errors. 
  7956.  
  7957.             INTERN - to place an object on the object list. 
  7958.  
  7959.             LAMBDA - a type of function binding in which the arguments
  7960.           to  the  function  are  automatically  evaluated   when  the
  7961.           function is entered.  see NLAMBDA, EXPR, FEXPR.
  7962.  
  7963.             MDL  -  pronounced  "muddle." One of the more  interesting
  7964.           LISP  offshoots,  developed  at M.I.T., which was marked  by
  7965.           (among other things) unusual parameter-passing conventions. 
  7966.           These  conventions,  including  &optional,  &rest, and  &aux
  7967.           parameters, later found their way into LISP Machine LISP and
  7968.           (much later) PDLISP.
  7969.  
  7970.             Note - some people consider MACLISP  to  be an offshoot of
  7971.           MDL, instead of the other way around. 
  7972.  
  7973.             MUNG - stands for "Messed Up until No Good."
  7974.  
  7975.             NOWARE - software which has passed through the  stages  of
  7976.           VAPORWARE and HYPERWARE,  and  has arrived into the hands of
  7977.           the customer. 
  7978.  
  7979.  
  7980.  
  7981.  
  7982.                                      - 255 -              Version 1.10
  7983.           
  7984.  
  7985.  
  7986.  
  7987.  
  7988.  
  7989.  
  7990.           PDLISP language manual                        LISP Glossary
  7991.           
  7992.  
  7993.  
  7994.  
  7995.             NLAMBDA - type of  function binding in which the arguments
  7996.           to the  function  are not evaluated.  For example, if F were
  7997.           defined to be an NLAMBDA of 2 arguments, A and B, then A and
  7998.           B would not be evaluated automatically before the code for F
  7999.           was executed.  See LAMBDA, EXPR, FEXPR.
  8000.  
  8001.             READER  -  The  part  of  the LISP interpreter which reads
  8002.           s-expressions  in  from  the  console,  disk, or a  string. 
  8003.           Internment of symbols in the object list takes place at this
  8004.           time. 
  8005.  
  8006.             SCREEN EDITOR - A type of editor which displays the object
  8007.           to  be edited on a terminal, and which allows  the  user  to
  8008.           interactively  "move around" inside the object being  edited
  8009.           via  keyboard  strokes,  a  mouse,  or some other  "pointing
  8010.           device."  The object being edited may  reside  on  disk in a
  8011.           text  file,  or  it may be an object internal  to  the  LISP
  8012.           virtual image.  The most popular editor in the LISP world is
  8013.           probably EMACS, which was written in  TECO, at MIT. TECO, by
  8014.           the  way,  is  easily  one  of  the  worst  languages   ever
  8015.           developed, at least in terms  of  readability,  and this may
  8016.           explain why the  MIT  community was driven to develop EMACS.
  8017.           EMACS  has  spawned a number of derivatives in a variety  of
  8018.           operating system  environments,  including  CCA  and GOSLING
  8019.           EMACS on UNIX, and MINCE on CP/M and  MS-DOS  (from  Mark of
  8020.           the Unicorn).
  8021.  
  8022.             SPECIAL FORM - a  function which does not follow the usual
  8023.           rules  for  evaluation  which  are  standard  for  LAMBDA's,
  8024.           NLAMBDA's, etc.  Such a function is usually given all of its
  8025.           arguments unevaluated, and then it evaluates them internally
  8026.           at its own discretion. 
  8027.  
  8028.             STRUCTURE EDITOR - A type of LISP editor which operates on
  8029.           an s-expression which is in RAM, and which contains commands
  8030.           to  move  around  the  s-expression's  component  elements. 
  8031.           Proponents of structure  editors  maintain  that  an  editor
  8032.           should  reflect the logical structure of the object which is
  8033.           being  edited.   LED,  the  structure editor  provided  with
  8034.           PDLISP, is  a  derivative  of  the  BBN-INTERLISP  editor. 
  8035.           Compare with "Text Editor" and "Screen Editor."
  8036.  
  8037.             SYMBOL TABLE - A table  on which one entry for each symbol
  8038.           is  constructed  by the reader.  Numbers and quoted  strings
  8039.           are  generally  not  on the symbol table.  Another name  for
  8040.           this construct is "object list." 
  8041.  
  8042.             TEXT EDITOR  -  A  type  of  editor which operates on disk
  8043.           files which are organized as a stream of  characters.  There
  8044.           are basically  two  types  of text editors - line and screen
  8045.  
  8046.  
  8047.  
  8048.                                      - 256 -              Version 1.10
  8049.           
  8050.  
  8051.  
  8052.  
  8053.  
  8054.  
  8055.  
  8056.           PDLISP language manual                        LISP Glossary
  8057.           
  8058.  
  8059.  
  8060.  
  8061.           editors.  Line  editors  work with a line of text at a time,
  8062.           and  typically  display  text only under explicit  command. 
  8063.           Screen editors allow the user to move the  cursor around the
  8064.           screen,  and  any  text  which he/she alters is  immediately
  8065.           updated on the screen.  See "screen editor." 
  8066.  
  8067.             TOP-LEVEL - a generic  term  for  the  "top-level" routine
  8068.           which  a  LISP  interpreter  is  executing.   Usually,  this
  8069.           routine  is  a  simple  read-eval-print loop, but many  LISP
  8070.           interpreters,  including  PDLISP,  allow this to be altered
  8071.           via a "hook" function. 
  8072.  
  8073.             UCI  LISP - A LISP dialect developed at the University  of
  8074.           California at Irvine.
  8075.  
  8076.             VAPORWARE  -   software   which   is  promised  but  never
  8077.           delivered. 
  8078.  
  8079.             VIRTUAL IMAGE - the entire set of  objects  which  PDLISP
  8080.           (or,  for  that matter, any LISP interpreter) knows  about. 
  8081.           The virtual image can  be  saved  on disk and retrieved at a
  8082.           later date.  The disk file in which the  image  is  saved is
  8083.           called the "image file," and the standard file  name  suffix
  8084.           in PDLISP for this type of file is ".img".
  8085.  
  8086.           
  8087.  
  8088.  
  8089.  
  8090.  
  8091.  
  8092.  
  8093.  
  8094.  
  8095.  
  8096.  
  8097.  
  8098.  
  8099.  
  8100.  
  8101.  
  8102.  
  8103.  
  8104.  
  8105.  
  8106.  
  8107.  
  8108.  
  8109.  
  8110.  
  8111.  
  8112.  
  8113.  
  8114.                                      - 257 -              Version 1.10
  8115.           
  8116.  
  8117.  
  8118.  
  8119.  
  8120.  
  8121.  
  8122.           PDLISP language manual                        LISP Glossary
  8123.           
  8124.  
  8125.  
  8126.  
  8127.  
  8128.                        This page intentionally left blank
  8129.  
  8130.  
  8131.  
  8132.  
  8133.  
  8134.  
  8135.  
  8136.  
  8137.  
  8138.  
  8139.  
  8140.  
  8141.  
  8142.  
  8143.  
  8144.  
  8145.  
  8146.  
  8147.  
  8148.  
  8149.  
  8150.  
  8151.  
  8152.  
  8153.  
  8154.  
  8155.  
  8156.  
  8157.  
  8158.  
  8159.  
  8160.  
  8161.  
  8162.  
  8163.  
  8164.  
  8165.  
  8166.  
  8167.  
  8168.  
  8169.  
  8170.  
  8171.  
  8172.  
  8173.  
  8174.  
  8175.  
  8176.  
  8177.  
  8178.  
  8179.  
  8180.                                      - 258 -              Version 1.10
  8181.           
  8182.  
  8183.  
  8184.  
  8185.  
  8186.  
  8187.  
  8188.           PDLISP language manual                        LISP Glossary
  8189.           
  8190.  
  8191.  
  8192.  
  8193.  
  8194.                        This page intentionally left blank
  8195.  
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.  
  8202.  
  8203.  
  8204.  
  8205.  
  8206.  
  8207.  
  8208.  
  8209.  
  8210.  
  8211.  
  8212.  
  8213.  
  8214.  
  8215.  
  8216.  
  8217.  
  8218.  
  8219.  
  8220.  
  8221.  
  8222.  
  8223.  
  8224.  
  8225.  
  8226.  
  8227.  
  8228.  
  8229.  
  8230.  
  8231.  
  8232.  
  8233.  
  8234.  
  8235.  
  8236.  
  8237.  
  8238.  
  8239.  
  8240.  
  8241.  
  8242.  
  8243.  
  8244.  
  8245.  
  8246.                                      - 259 -              Version 1.10
  8247.           
  8248.  
  8249.  
  8250.  
  8251.  
  8252.  
  8253.  
  8254.           PDLISP language manual                      Product Support
  8255.           
  8256.  
  8257.  
  8258.  
  8259.  
  8260.  
  8261.  
  8262.  
  8263.  
  8264.  
  8265.                                    Appendix F
  8266.  
  8267.                                  Product Support
  8268.  
  8269.  
  8270.  
  8271.           PDLISP is currently distribute free of charge through
  8272.           bulletin board systems (BBS's) nationwide. In addition,
  8273.           the latest version can always be obtained by contacting 
  8274.  
  8275.                   A.D.A.
  8276.                   1570 Arran Way
  8277.                   Dresher, Penna. 19025
  8278.                   (215)-646-4894
  8279.  
  8280.             I believe that they charge $10 plus shipping and handling
  8281.           for this service.
  8282.  
  8283.           At some future point, I am planning upon providing
  8284.           some kind of direct electronic support for PDLISP, either
  8285.           through my own BBS, a UNIX system, or one of the commercial
  8286.           computer service companies (compuserve, etc). Stay tuned.
  8287.  
  8288.  
  8289.  
  8290.  
  8291.  
  8292.  
  8293.  
  8294.  
  8295.  
  8296.  
  8297.  
  8298.  
  8299.  
  8300.  
  8301.  
  8302.  
  8303.  
  8304.  
  8305.  
  8306.  
  8307.  
  8308.  
  8309.  
  8310.  
  8311.  
  8312.                                      - 260 -              Version 1.10
  8313.           
  8314.  
  8315.  
  8316.  
  8317.  
  8318.  
  8319.  
  8320.           PDLISP language manual                      Product Support
  8321.           
  8322.  
  8323.  
  8324.  
  8325.  
  8326.  
  8327.  
  8328.  
  8329.  
  8330.  
  8331.  
  8332.  
  8333.  
  8334.  
  8335.  
  8336.  
  8337.  
  8338.  
  8339.  
  8340.  
  8341.  
  8342.  
  8343.  
  8344.  
  8345.  
  8346.  
  8347.  
  8348.  
  8349.  
  8350.  
  8351.  
  8352.  
  8353.  
  8354.  
  8355.  
  8356.  
  8357.  
  8358.  
  8359.  
  8360.  
  8361.  
  8362.  
  8363.  
  8364.  
  8365.  
  8366.  
  8367.  
  8368.  
  8369.  
  8370.  
  8371.  
  8372.  
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.                                      - 261 -              Version 1.10
  8379.           
  8380.  
  8381.  
  8382.  
  8383.  
  8384.  
  8385.  
  8386.                              PDLISP language manual
  8387.           
  8388.  
  8389.  
  8390.  
  8391.  
  8392.  
  8393.  
  8394.  
  8395.                                       Index
  8396.  
  8397.  
  8398.           $  75
  8399.           $$  75
  8400.           %  152
  8401.           &OPTIONAL  38
  8402.           &REST  38
  8403.           *  153
  8404.           +  153
  8405.           -  153
  8406.           /USR  73
  8407.           /USR/LOGIN  73
  8408.           <  153
  8409.           <=  153
  8410.           >  152
  8411.           >=  152
  8412.           ADD-TO-LIST  62
  8413.           ADD-TO-PATH  87
  8414.           algorithm  7
  8415.           ALLOC  200
  8416.           AND  156
  8417.           APPEND  18, 44
  8418.           APPLY  96
  8419.           arrays  145
  8420.           ATOM  20, 44
  8421.           atoms  2
  8422.           auto-quoting  16
  8423.           BACK_QUOTE_HOOK  189
  8424.           BAKTRACE  180
  8425.           BAKTRCE  180
  8426.           bindings  6
  8427.           BLOCK  103
  8428.           bound variable  33
  8429.           BOUNDP  65
  8430.           box notation  23
  8431.           BREAK  174
  8432.           BREAK_HOOK  185, 186
  8433.           BREAK_LEVEL  192
  8434.           CAR  13, 44
  8435.           CATCH  109, 109
  8436.           CD  74, 87
  8437.           CDQ  74, 87
  8438.           CDR  13, 45
  8439.           character object  139
  8440.           character strings  135
  8441.  
  8442.  
  8443.  
  8444.                                                           Version 1.07
  8445.           
  8446.  
  8447.  
  8448.  
  8449.  
  8450.  
  8451.  
  8452.                              PDLISP language manual
  8453.           
  8454.  
  8455.  
  8456.  
  8457.           child  75
  8458.           clauses  97
  8459.           CNSUBRP  65
  8460.           COMMA_AT_HOOK  190
  8461.           COMMA_HOOK  189
  8462.           comments  5
  8463.           COMPILED-FUNCTION-P  65
  8464.           COND  97
  8465.           cond pairs  97
  8466.           CONS  18, 45
  8467.           cons cell  18
  8468.           consequents  97
  8469.           console i/o  121
  8470.           CONSP  18, 62
  8471.           constants  17
  8472.           conversion character  195
  8473.           CSUBRP  66, 66, 66
  8474.           current directory  72
  8475.           CURRENT_DIR  191
  8476.           CXXR  63
  8477.           CXXXR  63
  8478.           DEBUG  181
  8479.           DEBUGQ  181
  8480.           DEBUGSET  181
  8481.           DEF  46
  8482.           DEF$  87
  8483.           DELETE  63
  8484.           DIR  79, 88
  8485.           directory prefix  78
  8486.           DIRP  66
  8487.           DIRQ  88
  8488.           DIR_PREFIX_FLAG  187
  8489.           discipline  42
  8490.           DIV  152
  8491.           DO  98, 98
  8492.           DO*  98, 100
  8493.           dotted pairs  24
  8494.           dummy variable  33
  8495.           EQ  20, 28, 45
  8496.           EQL  20, 28, 45
  8497.           EQUAL  20, 28, 45
  8498.           ERR  111
  8499.           Error Handling  110
  8500.           error hook  188
  8501.           ERROR_HOOK  188
  8502.           ERROR_LABEL  190
  8503.           ERRSET  111
  8504.           EVAL  96
  8505.           EVAL_HOOK  187
  8506.           EXIT  5
  8507.  
  8508.  
  8509.  
  8510.                                                           Version 1.07
  8511.           
  8512.  
  8513.  
  8514.  
  8515.  
  8516.  
  8517.  
  8518.                              PDLISP language manual
  8519.           
  8520.  
  8521.  
  8522.  
  8523.           EXPLODE  139
  8524.           file i/o  124
  8525.           FIRSTN  63
  8526.           FIXP  152
  8527.           FLATSIZE  138
  8528.           floating point format  132
  8529.           floating pt format hook  195
  8530.           FLOATP  152
  8531.           floats  2
  8532.           FLOAT_FORMAT  195
  8533.           form  30
  8534.           FULL_PATH_FLAG  187
  8535.           function cell  26, 27
  8536.           functional directory  87
  8537.           GC  200
  8538.           GC_VERBOSITY  188
  8539.           GENSTRING  140
  8540.           GENSYM  141
  8541.           GET  114
  8542.           GETD  47
  8543.           GETFREE  201
  8544.           GLOBAL  88
  8545.           global symbols  81
  8546.           GLOBALP  88
  8547.           Hooks  184
  8548.           IF  97
  8549.           image files  57
  8550.           Implicit PROGN  107
  8551.           IMPLODE  139
  8552.           IMPLODE-TO-STRING  141
  8553.           input  119
  8554.           integers  2
  8555.           INTERN  141
  8556.           internment  26
  8557.           LAMBDA  33, 34
  8558.           lambda binding  34
  8559.           lambda expression  33
  8560.           lambda-binding transaction  34
  8561.           LAST  64
  8562.           LCONC  68
  8563.           LED  161
  8564.           LENGTH  64
  8565.           LEXPR  35
  8566.           LIST  19, 46
  8567.           LISTP  64
  8568.           lists  2, 3
  8569.           LOAD  55, 119
  8570.           LOADV  55, 119
  8571.           LOCAL  88
  8572.           local symbols  81
  8573.  
  8574.  
  8575.  
  8576.                                                           Version 1.07
  8577.           
  8578.  
  8579.  
  8580.  
  8581.  
  8582.  
  8583.  
  8584.                              PDLISP language manual
  8585.           
  8586.  
  8587.  
  8588.  
  8589.           LOCALP  89
  8590.           LOOP  108
  8591.           LQ  79, 89
  8592.           MACRO  35
  8593.           macro expansion  35
  8594.           MAKE-SYMBOL  141
  8595.           MAKE-TCONC  68
  8596.           MAPC  100
  8597.           MAPCAN  100
  8598.           MAPCAR  100
  8599.           MAPCON  100
  8600.           MAPL  100
  8601.           MAPLIST  100
  8602.           mapping functions  100
  8603.           mark list  167
  8604.           marks  167
  8605.           MCD  75, 90
  8606.           MCDQ  75, 90
  8607.           MD  74, 90
  8608.           MDQ  74, 90
  8609.           MEMBER  64
  8610.           MEMMAP  201, 245
  8611.           memory cells  22
  8612.           MOD  153
  8613.           NCONC  67
  8614.           NEQL  153
  8615.           NIL  14
  8616.           NLAMBDA  35
  8617.           NOT  156
  8618.           NTHCDR  64, 99
  8619.           NULL  21, 65
  8620.           NUMBERP  21, 46
  8621.           numbers  2
  8622.           object list  26, 71
  8623.           optional parameter  38
  8624.           OR  156
  8625.           output  119
  8626.           parent  75, 76, 90
  8627.           parenthesis counting  9
  8628.           PARENTQ  76
  8629.           path-name  71
  8630.           PATHLST  90
  8631.           PATHNME  90
  8632.           PATHSTR  91
  8633.           PCOUNT_FLAG  191
  8634.           PD  84, 91
  8635.           PDQ  84, 91
  8636.           plist cell  26, 27
  8637.           POPD  84, 91
  8638.           POPPATH  91
  8639.  
  8640.  
  8641.  
  8642.                                                           Version 1.07
  8643.           
  8644.  
  8645.  
  8646.  
  8647.  
  8648.  
  8649.  
  8650.                              PDLISP language manual
  8651.           
  8652.  
  8653.  
  8654.  
  8655.           POPPROP  116
  8656.           PP  119
  8657.           PPDEF  119
  8658.           predicates  20
  8659.           primitive functions  12
  8660.           PRINC  120
  8661.           PRINT  120
  8662.           print flag  167
  8663.           print-name cell  26, 27
  8664.           PROG  101, 101
  8665.           PROG*  106
  8666.           PROG1  107, 107
  8667.           PROGN  107, 107
  8668.           property lists  114
  8669.           PTOSTR  120
  8670.           PUSHPATH  91
  8671.           PUSHPROP  116
  8672.           PUTD  47
  8673.           PUTPROP  115
  8674.           QUOTE  16, 46
  8675.           quote marks  15
  8676.           quoted strings  3
  8677.           READ  120
  8678.           reader  77
  8679.           reader search path  77, 77
  8680.           READER_SEARCH_PATH  194
  8681.           recursive algorithm  7
  8682.           recursive definition  7
  8683.           REMOVE-FIRST  68
  8684.           REMPROP  115
  8685.           RESET  182
  8686.           rest parameter  38
  8687.           RESTORE  57, 58
  8688.           REVERSE  19, 65
  8689.           RM  83, 91
  8690.           RMDIR  84, 92
  8691.           RMDIRQ  84, 92
  8692.           RMQ  83, 92
  8693.           root directory  73, 73
  8694.           RPLACA  67
  8695.           RPLACD  67
  8696.           S-expressions  1
  8697.           SAVE  57, 58
  8698.           scientific notation  2
  8699.           semicolon  5
  8700.           SET  16, 47
  8701.           SETPLIST  115
  8702.           SETQ  6, 47
  8703.           SHELL  198
  8704.           SHOWSTACK  179
  8705.  
  8706.  
  8707.  
  8708.                                                           Version 1.07
  8709.           
  8710.  
  8711.  
  8712.  
  8713.  
  8714.  
  8715.  
  8716.                              PDLISP language manual
  8717.           
  8718.  
  8719.  
  8720.  
  8721.           side effect  6, 67
  8722.           smash hook  37
  8723.           SMASH_HOOK  186
  8724.           SRMDIR  92
  8725.           STATUS  184, 184
  8726.           STRCAT  135, 137
  8727.           STRCMP  135, 135
  8728.           STREQ  135
  8729.           STRLEN  136
  8730.           STRLENC  136
  8731.           STRXTRC  135, 137, 137
  8732.           sub-directory  75
  8733.           surgical functions  67
  8734.           symbol table  26
  8735.           SYMBOL-PLIST  115
  8736.           symbolic expressions  1
  8737.           SYMBOLP  20, 66
  8738.           system error handler hook  188
  8739.           tag body  102
  8740.           TAGBODY  102
  8741.           TCONC  68
  8742.           tconc structure  68
  8743.           TERPRI  120
  8744.           THROW  109, 109
  8745.           TRACE  182
  8746.           TYPE  65
  8747.           UNPRINT  120
  8748.           UNTRACE  182
  8749.           value cell  27
  8750.           variable cell  26, 27
  8751.           VARP  66
  8752.           X_POSITION  193
  8753.           Y_POSITION  193
  8754.           ZEROP  21, 46
  8755.  
  8756.  
  8757.  
  8758.  
  8759.  
  8760.  
  8761.  
  8762.  
  8763.  
  8764.  
  8765.  
  8766.  
  8767.  
  8768.  
  8769.  
  8770.  
  8771.  
  8772.  
  8773.  
  8774.                                                           Version 1.07
  8775.           
  8776.  
  8777.  
  8778.  
  8779.  
  8780.  
  8781.  
  8782.                              PDLISP language manual
  8783.           
  8784.  
  8785.  
  8786.  
  8787.  
  8788.  
  8789.  
  8790.  
  8791.                            Table of Contents
  8792.  
  8793.  
  8794.           Chapter 1 An Overview of LISP                          1
  8795.  
  8796.              1.1 Symbolic Expressions                            1
  8797.  
  8798.                 1.1.1 Atoms and Lists                            2
  8799.                 1.1.2 Reserved Words                             2
  8800.                 1.1.3 Numbers                                    3
  8801.                 1.1.4 Quoted Strings                             3
  8802.  
  8803.              1.2 The PDLISP evaluator                           4
  8804.              1.3 The Pause which Refreshes                       5
  8805.              1.4 Assigning Values to Variables                   6
  8806.              1.5 Parenthesis Counting                            9
  8807.  
  8808.           Chapter 2 Some System Primitives                       12
  8809.  
  8810.              2.1 Some Primitive Functions                        12
  8811.  
  8812.                 2.1.1 CAR and CDR                                13
  8813.                 2.1.2 Quote Marks and the Evaluator              15
  8814.                 2.1.3 Auto-Quoting Functions and Atoms           16
  8815.                 2.1.4 CONS and CONSP                             18
  8816.                 2.1.5 APPEND                                     18
  8817.                 2.1.6 LIST                                       19
  8818.                 2.1.7 REVERSE                                    19
  8819.  
  8820.              2.2 Some Useful Predicates                          20
  8821.  
  8822.                 2.2.1 ATOM and SYMBOLP                           20
  8823.                 2.2.2 EQ, EQL, and EQUAL                         20
  8824.                 2.2.3 NULL                                       21
  8825.                 2.2.4 NUMBERP                                    21
  8826.                 2.2.5 ZEROP                                      21
  8827.                 2.2.6 EVAL and explicit evaluation               21
  8828.  
  8829.              2.3 Internal Representation of Symbolic
  8830.                          Expressions                             22
  8831.  
  8832.                 2.3.1 Nodes and Lists                            22
  8833.                 2.3.2 Dotted Pairs                               24
  8834.                 2.3.3 Atoms and Symbols                          26
  8835.                 2.3.4 Symbolic Structure                         26
  8836.                 2.3.5 Unique Representation and Equality
  8837.  
  8838.  
  8839.  
  8840.                                                           Version 1.07
  8841.           
  8842.  
  8843.  
  8844.  
  8845.  
  8846.  
  8847.  
  8848.                              PDLISP language manual
  8849.           
  8850.  
  8851.  
  8852.  
  8853.                                                                  27
  8854.  
  8855.              2.4 Exercises                                       29
  8856.  
  8857.           Chapter 3 User-Defined Functions                       30
  8858.  
  8859.              3.1 Defining Functions                              31
  8860.              3.2 DEF and PUTD                                    32
  8861.              3.3 Lambda Binding                                  34
  8862.              3.4 NLAMBDA's                                       35
  8863.              3.5 LEXPR's                                         35
  8864.              3.6 MACRO's                                         35
  8865.  
  8866.                 3.6.1 Displacing Macros                          36
  8867.                 3.6.2 Backquoting                                36
  8868.                 3.6.3 The Smash Hook                             37
  8869.  
  8870.              3.7 Optional, Rest, and Auxilliary Parameters
  8871.                                                                  38
  8872.              3.8 Initialized &OPTIONAL parameters                40
  8873.              3.9 Auxilliary Parameters                           40
  8874.              3.10 PDLISP Function Descriptions                  42
  8875.              3.11 Summary of Functions Presented So Far          44
  8876.  
  8877.           Chapter 4 Program Development in PDLISP               55
  8878.  
  8879.              4.1 What's a Program?                               55
  8880.              4.2 Saving and Restoring PDLISP Sessions           57
  8881.              4.3 Summary of Virtual Image Commands               58
  8882.              4.4 Booting Up PDLISP                              58
  8883.  
  8884.           Chapter 5 List Processing Functions                    62
  8885.  
  8886.              5.1 Miscellaneous Predicates                        65
  8887.              5.2 Surgical Functions                              67
  8888.              5.3 TCONC Structures                                68
  8889.  
  8890.           Chapter 6 PDLISP Directory Structure                  71
  8891.  
  8892.              6.1 Initial PDLISP Directory Configuration
  8893.                                                                  73
  8894.              6.2 Creating Directories                            74
  8895.              6.3 The $ and $$ symbols                            75
  8896.              6.4 PARENT and PARENTQ functions                    76
  8897.              6.5 The Reader Search Path                          77
  8898.              6.6 Directory Prefixes                              78
  8899.  
  8900.                 6.6.1 The Current Directory Prefix               78
  8901.                 6.6.2 The Directory Suffix                       78
  8902.  
  8903.  
  8904.  
  8905.  
  8906.                                                           Version 1.07
  8907.           
  8908.  
  8909.  
  8910.  
  8911.  
  8912.  
  8913.  
  8914.                              PDLISP language manual
  8915.           
  8916.  
  8917.  
  8918.  
  8919.              6.7 The DIR Function                                79
  8920.              6.8 The LQ function                                 79
  8921.              6.9 Global and Local Symbols                        81
  8922.              6.10 RM and RMQ                                     83
  8923.              6.11 RMDIR and RMDIRQ                               84
  8924.              6.12 PD, PDQ, and POPD                              84
  8925.              6.13 Common Mistakes when Using Directories
  8926.                                                                  85
  8927.              6.14 Functional Directories                         86
  8928.              6.15 Summary of Directory Management Functions
  8929.                                                                  87
  8930.  
  8931.           Chapter 7 Control Constructs                           96
  8932.  
  8933.              7.1 Explicit Evaluation                             96
  8934.              7.2 Conditional Evaluation                          97
  8935.              7.3 DO and DO*                                      98
  8936.              7.4 Mapping Functions                               100
  8937.              7.5 PROG and Friends                                101
  8938.              7.6 PROGN and PROG1                                 107
  8939.              7.7 Implicit PROGN                                  107
  8940.              7.8 LOOP                                            108
  8941.              7.9 CATCH and THROW                                 109
  8942.              7.10 Error Handling in PDLISP                      110
  8943.  
  8944.           Chapter 8 Property Lists                               114
  8945.  
  8946.              8.1 GET, PUTPROP, and REMPROP                       114
  8947.              8.2 SYMBOL-PLIST and SETPLIST                       115
  8948.              8.3 PUSHPROP and POPPROP                            116
  8949.  
  8950.           Chapter 9 Input and Output                             119
  8951.  
  8952.              9.1 Console I/O                                     121
  8953.              9.2 File I/O                                        124
  8954.              9.3 The PDLISP Reader                              127
  8955.              9.4 Floating Point Formats                          132
  8956.  
  8957.           Chapter 10 Character Strings                           135
  8958.  
  8959.              10.1 STRCMP and STREQ                               135
  8960.              10.2 STRLEN and STRLENC                             136
  8961.              10.3 STRCAT                                         137
  8962.              10.4 STRINGP                                        137
  8963.              10.5 STRXTRC                                        137
  8964.              10.6 FLATSIZE                                       138
  8965.              10.7 EXPLODE and IMPLODE                            139
  8966.              10.8 GENSTRING                                      140
  8967.              10.9 GENSYM                                         141
  8968.  
  8969.  
  8970.  
  8971.  
  8972.                                                           Version 1.07
  8973.           
  8974.  
  8975.  
  8976.  
  8977.  
  8978.  
  8979.  
  8980.                              PDLISP language manual
  8981.           
  8982.  
  8983.  
  8984.  
  8985.           Chapter 11 Arrays                                      145
  8986.  
  8987.           Chapter 12 Arithmetic and Mathematical Functions
  8988.                                                                  152
  8989.  
  8990.           Chapter 13 Logic Functions                             156
  8991.  
  8992.           Chapter 14 LED, the PDLISP Structure Editor           161
  8993.  
  8994.              14.1 Invoking and Exiting LED                       161
  8995.              14.2 Getting Around                                 162
  8996.              14.3 Making Mistakes                                163
  8997.              14.4 Making Changes                                 164
  8998.              14.5 How LED prints out expressions                 165
  8999.              14.6 A Quick Summary of LED Commands                166
  9000.  
  9001.                 14.6.1 Structure Modification Commands           167
  9002.                 14.6.2 Parenthesis Moving Commands               168
  9003.  
  9004.           Chapter 15 PDLISP Debugging Functions                 172
  9005.  
  9006.              15.1 The PDLISP Debugger                           172
  9007.  
  9008.                 15.1.1 A Bird's Eye View of the Stack            172
  9009.                 15.1.2 DEBUG and DEBUGQ                          173
  9010.  
  9011.              15.2 A Sample Debugging Session                     175
  9012.              15.3 Debugger Support Functions                     179
  9013.  
  9014.                 15.3.1 TRACE and UNTRACE                         182
  9015.  
  9016.              15.4 System Hooks and the STATUS Function           184
  9017.  
  9018.                 15.4.1 The Top-Level Hook                        185
  9019.                 15.4.2 The Pretty-Printer Hook                   185
  9020.                 15.4.3 The Smash Hook                            186
  9021.                 15.4.4 The Break Hook                            186
  9022.                 15.4.5 The Evaluatator Hook                      187
  9023.                 15.4.6 The Full Path Flag                        187
  9024.                 15.4.7 The Directory Prefix Flag                 187
  9025.                 15.4.8 The Error Hook                            188
  9026.                 15.4.9 The Garbage Collector Verbosity Flag
  9027.                                                                  188
  9028.                 15.4.10 The Back-Quote Hook                      189
  9029.                 15.4.11 The Comma Hook                           189
  9030.                 15.4.12 The Comma-At Hook                        190
  9031.                 15.4.13 The Error Label Hook                     190
  9032.                 15.4.14 The Parenthesis Counting Flag            191
  9033.                 15.4.15 The Current Directory Hook               191
  9034.                 15.4.16 The Break Level Hook                     192
  9035.  
  9036.  
  9037.  
  9038.                                                           Version 1.07
  9039.           
  9040.  
  9041.  
  9042.  
  9043.  
  9044.  
  9045.  
  9046.                              PDLISP language manual
  9047.           
  9048.  
  9049.  
  9050.  
  9051.                 15.4.17 The X-Position Hook                      193
  9052.                 15.4.18 The Y-Position Hook                      193
  9053.                 15.4.19 The Reader Search Path Hook              194
  9054.                 15.4.20 The Floating Point Format Hook           195
  9055.  
  9056.           Chapter 16 Interfacing to the Operating System
  9057.                                                                  197
  9058.  
  9059.           Chapter 17 Storage Management                          200
  9060.  
  9061.           Appendix A Bibliography                                204
  9062.  
  9063.           Appendix B PDLISP Error Messages                      211
  9064.  
  9065.           Appendix C Running PDLISP Under MS-DOS & PC-DOS
  9066.                                                                  234
  9067.  
  9068.              17.1 Packing List                                   234
  9069.              17.2 Getting Started                                234
  9070.              17.3 Running PDLISP on a Floppy-Only System
  9071.                                                                  236
  9072.              17.4 Editing of Initialization Files                237
  9073.              17.5 Error Messages on MS-DOS                       238
  9074.              17.6 Peculiarities                                  242
  9075.              17.7 Memory Configuration under MS-DOS              243
  9076.  
  9077.           Appendix D Running PDLISP Under UNIX                  248
  9078.  
  9079.           Appendix E LISP Glossary                               253
  9080.  
  9081.           Appendix F Product Support                             260
  9082.  
  9083.  
  9084.  
  9085.  
  9086.  
  9087.  
  9088.  
  9089.  
  9090.  
  9091.  
  9092.  
  9093.  
  9094.  
  9095.  
  9096.  
  9097.  
  9098.  
  9099.  
  9100.  
  9101.  
  9102.  
  9103.  
  9104.                                                           Version 1.07
  9105.           
  9106.  
  9107.  
  9108.  
  9109.