home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / usr.bin / lisp / lispnews / text0148.txt < prev    next >
Encoding:
Text File  |  1985-11-10  |  7.8 KB  |  338 lines

  1.  
  2.   If a vector has a 'unique' property on it's property list, then it will
  3. not be copied by 'copy'.
  4.  
  5.   'untrace' will now autoload /usr/lib/lisp/trace.
  6.  
  7.   A number of functions and macros were contributed by the bair group:
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16. (<= 'fx_arg1 'fx_arg2 ...)
  17. (<=& 'x_arg1 'x_arg2)
  18.  
  19.      RETURNS: t iff (> 'fx_arg1 'fx_arg2)  [or  (>&  'x_arg1
  20.               'x_arg2)]  is nil, otherwise nil.  The general
  21.               function, <=, can take  more  than  two  argu-
  22.               ments.
  23.  
  24. (>= 'fx_arg1 'fx_arg2)
  25. (>=& 'x_arg1 'x_arg2)
  26.  
  27.      RETURNS: t  iff  (<  'fx_arg1  'fx_arg2  ...)  [or  (<&
  28.               'x_arg1 'x_arg2)] is nil, otherwise nil.
  29.  
  30.      NOTE: The general function, >=, can take more than  two
  31.            arguments.
  32.  
  33. (litatom 'g_arg)
  34.  
  35.      RETURNS: t iff g_arg is an atom, but not a number.
  36.  
  37. (nequal 'g_x 'g_y)
  38.  
  39.      RETURNS: t iff g_x is not equal to g_y, otherwise nil.
  40.  
  41. (lineread [['p_port] ['s_flag]])
  42.  
  43.      RETURNS: a list consisting of s-expressions on  a  line
  44.               from  the  port p_port (or piport if p_port is
  45.               not given).  If an s-expression (e.g., a list)
  46.               takes more than one line, or a line terminates
  47.               in a space or  tab,  then  lineread  continues
  48.               reading until an expression ends at the end of
  49.               a line.
  50.  
  51.      NOTE: If s_flag is t, then if the first character on  a
  52.            line  is  a  newline, lineread performs a tyi and
  53.            returns nil.  If s_flag is nil  or  not  present,
  54.            lineread  does  a  read  skipping  over any blank
  55.            lines to make sure that an s-expression is  actu-
  56.            ally read.
  57.  
  58.      SIDE EFFECT: lineread uses  read,  advancing  the  port
  59.                   character pointer.
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. (defv g_arg1 g_arg2)
  80.  
  81.      EQUIVALENT TO: (set g_arg1 g_arg2)
  82.  
  83. (pp-form 'g_form ['p_port] ['n_lmar])
  84.  
  85.      RETURNS: nil
  86.  
  87.      SIDE EFFECT: g_form  is  pretty-printed  to  the   port
  88.                   p_port (or poport if p_port is not given).
  89.                   If  pp-form  is  also  supplied  with   an
  90.                   integer  (n_lmar),  that  integer  will be
  91.                   used as a left margin setting  (0  is  the
  92.                   default).   This is the  function which pp
  93.                   uses (n_lmar = 0). pp-form does  not  look
  94.                   for  function  definitions  or  values  of
  95.                   variables, it just prints out the form  it
  96.                   is given.
  97.  
  98.      NOTE: This is useful as a top-level-printer, c.f.  top-
  99.            level in Chapter 6.
  100.  
  101. (sload 's_file1 ...)
  102.  
  103.      SIDE EFFECT: The files named are opened for reading and
  104.                   each form is read, optionally printed, and
  105.                   evaluated.
  106.  
  107.      NOTE: What sload prints is controlled  by  the  special
  108.            atom  $sldprint.   If  $sldprint  is t (default),
  109.            then if a form  is  recognizable  as  a  function
  110.            definition,  only  the  function name is printed,
  111.            otherwise  the  whole  form   is   printed.    If
  112.            $sldprint is eq to value, then the result of each
  113.            form's evaluation will also be printed.  Printing
  114.            the  forms'  values  can be controlled by setting
  115.            sload-print equal to the name of the function  to
  116.            be  called.   sload recognizes named functions by
  117.            looking at  the  sloadprintarg  property  of  the
  118.            function  name.   The  value of the sloadprintarg
  119.            property should be the  argument  number  of  the
  120.            function name.  For the standard Franz Lisp func-
  121.            tions, the properties are already set.
  122.  
  123.      EXAMPLE: (defprop def 1 sloadprintarg)   ; This is  the
  124.               default--declaring that
  125.                                               ; the name  of
  126.               the function definition is the
  127.                                               ; first  argu-
  128.               ment.
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.           The functions described below are  an  alternative
  143.      to  the  gensym facility.  They generate new symbols by
  144.      attaching counter numbers to the ends of  the  symbols'
  145.      names.   An  example  follows  of how the functions are
  146.      used.
  147.  
  148.  
  149.     ____________________________________________________
  150.  
  151.     -> (initsym joe (john 5))       ; initializing new symbol counters
  152.     (joe0 john5)
  153.     -> (newsym john)                ; create a new symbol
  154.     john6
  155.     -> (newsym chuck)               ; symbol need not be initsym'ed
  156.     chuck0
  157.     -> (oldsym john)                ; get current symbol
  158.     john6
  159.     -> (allsym john)                ; get all symbols between 0 and counter
  160.     (john0 john1 john2 john3 john4 john5 john6)
  161.     -> (allsym (john 5))            ; get all symbols between 5 and counter
  162.     (john5 john6)
  163.     -> (remsym joe (john 4))        ; remob all interned symbols
  164.                                     ; associated with joe and from
  165.                                     ; john4 to the current john
  166.                                     ; symbol--returns symbols with symbol counters
  167.                                     ; before doing remsym
  168.     (joe0 john6)
  169.     -> (symstat joe john)
  170.     ((joe nil) (john 3))
  171.     ____________________________________________________
  172.  
  173.  
  174.  
  175.  
  176. (initsym g_arg1 ...)
  177.  
  178.      WHERE:   g_argi is a  list  (n_counteri  s_argi)  or  a
  179.               string  s_argi  (which  is  equivalent  to  (0
  180.               s_argi)).
  181.  
  182.      RETURNS: a list of interned identifiers using the  sym-
  183.               bol  counters  n_counteri, i.e., the result of
  184.               concatenating s_argi to n_counteri.
  185.  
  186.      EXAMPLE: (initsym joe (john 5)) ==> (joe0 john5)
  187.  
  188.      NOTE: See also newsym, oldsym, allsym, remsym, and sym-
  189.            stat functions.
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205. (newsym s_arg)
  206.  
  207.      RETURNS: an interned identifier formed by concatenating
  208.               the  name  s_arg  to  the  symbol  counter for
  209.               s_arg.  The symbol counter is  stored  on  the
  210.               property list of s_arg under symctr.  If there
  211.               is no counter, a counter  of  0  is  used  and
  212.               added  to  the  property list.  Thus, a symbol
  213.               need not be initsymed.
  214.  
  215.      EXAMPLE: (initsym joe (john5)) ==> (joe0 john5)
  216.               (newsym john) ==> john6
  217.               (newsym joe) ==> joe1
  218.  
  219.      NOTE: See also initsym,  oldsym,  allsym,  remsym,  and
  220.            symstat functions.
  221.  
  222. (oldsym s_arg)
  223.  
  224.      RETURNS: the  identifier  using  the   current   symbol
  225.               counter  for s_arg, rather than creating a new
  226.               identifier.  If no symbol counter  exists  for
  227.               s_arg, then s_arg is returned.
  228.  
  229.      NOTE: See also initsym,  newsym,  allsym,  remsym,  and
  230.            symstat functions.
  231.  
  232. (allsym g_arg)
  233.  
  234.      WHERE:   g_arg is a list (s_arg n_counter) or a  string
  235.               s_arg (equivalent to (s_arg 0)).
  236.  
  237.      RETURNS: a list of all the created identifiers  between
  238.               n_counter  and  the current symbol counter for
  239.               s_arg.
  240.  
  241.      EXAMPLE: (allsym john) ==> (john0 john1 john2)
  242.  
  243.      NOTE: See also initsym,  newsym,  oldsym,  remsym,  and
  244.            symstat functions.
  245.  
  246. (remsym g_arg1 ...)
  247.  
  248.      WHERE:   g_argi is a  list  (s_argi  n_counteri)  or  a
  249.               string  s_argi (which is equivalent to (s_argi
  250.               0)).
  251.  
  252.      RETURNS: a list of symbols s_argi with the current sym-
  253.               bol counters.
  254.  
  255.      SIDE EFFECT: remsym remob's all the created identifiers
  256.                   between   zero   and  the  current  symbol
  257.                   counter for s_argi.
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.      NOTE: See also initsym, newsym oldsym, allsym, and sym-
  272.            stat functions.
  273.  
  274. (symstat s_arg1 ...)
  275.  
  276.      RETURNS: a list of pairs consisting of (s_argi symctri)
  277.               where   symctri  is  s_argi's  current  symbol
  278.               counter.
  279.  
  280.      NOTE: See also initsym,  newsym,  oldsym,  allsym,  and
  281.            remsym functions.
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.