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

  1.  
  2. I believe the following fix repairs the problem in lisplib/array.l
  3. (I think this only affects you if you are on a 68k)
  4. ---
  5.  
  6. in function *array, towards the bottom change:
  7.  
  8.          ; if type is fixnum or flonum
  9.          ; we must intialize to 0 or 0.0
  10.          (cond ((or (and (eq 'fixnum type)
  11.                  (setq rtype 0))
  12.                 (and (eq 'flonum type)
  13.                  (setq rtype 0.0))
  14.                 (and (or (status feature 68k)
  15.                      (status feature for-68k))
  16.                  (progn (setq rtype nil) t)))
  17.             (do ((i size))
  18.                 ((zerop i))
  19.                 (set (arrayref tname (setq i (1- i))) rtype))))
  20. to be:
  21.  
  22.          ; if type is fixnum or flonum
  23.          ; we must intialize to 0 or 0.0
  24.          (cond ((or (and (or (eq 'fixnum type)(eq 'fixnum-block type))
  25.                  (setq rtype 0))
  26.                 (and (or (eq 'flonum type)(eq 'flonum-block type))
  27.                  (setq rtype 0.0))
  28.                 (and (or (status feature 68k)
  29.                      (status feature for-68k))
  30.                  (progn (setq rtype nil) t)))
  31.             (do ((i size))
  32.                 ((zerop i))
  33.                 (store (funcall tname (setq i (1- i))) rtype))))
  34.  
  35. The main problem being that the (status) call was testing true.
  36. Without changing the SET to a STORE I was still having troubles,
  37. so I changed that also. Flames welcome, not sure I understand everything
  38. going on here (yet.)
  39.  
  40.     -Barry Shein, Boston University
  41.  
  42. P.S. typical apologies if this has all been solved before.
  43. (while you are in there you might want to fix the spelling of 'intialize')
  44.  
  45.  
  46.