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

  1.  Added functions:
  2.    (vputprop 'Vv_vector 'g_value 'g_indicator)
  3.    (vget  'Vv_vector 'g_indicator)
  4.  
  5.   work just like putprop and get, but modify the vector property list.
  6.  
  7.  Also:
  8.    you can determine which function is called by lisp to print a vector
  9.  by placing the function to call on the vector's property list under
  10.  indicator 'print'.  The  print function is called with two arguments:
  11.  the vector and the port.
  12.  
  13.  For example:
  14. => (defun printv (v port)
  15.       (patom "A vector of size " port)
  16.       (print (vsize v) port))
  17. printv
  18. => (setq xx (new-vector 10))
  19. vector[40]
  20. => (vputprop xx 'printv 'print)
  21. printv
  22. => xx
  23. A vector of size 10
  24. =>
  25.  
  26.  
  27.  
  28.