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

  1. The following illustrates a rather unpleasant bug in Franz's ASSOC (as
  2. of 38.26, anyhow).  Be forewarned....
  3.  
  4. ------------------------------------------------------------------------------
  5.  
  6. 8_(setq l '((a 1) (b 2) (c 3)))           ;;set up an a-list
  7. ((a 1) (b 2) (c 3))
  8.  
  9. 9_(setq foo 'l)                   ;;FOO points to the NAME of the a-list
  10. l
  11.  
  12. 10_(setq bar 'foo)               ;;BAR points to the NAME of the NAME of
  13. foo                       ;;the a-list
  14.  
  15. 11_(assoc 'b l)                   ;;This does the right thing
  16. (b 2)
  17.  
  18. 12_(assoc 'b foo)               ;;Gag me with a mouse -- should err
  19. (b 2)                       ;;with "bad arg to <something>"
  20.  
  21. 13_(assoc 'b bar)               ;;Double gag me with a mouse!!
  22. (b 2)
  23.  
  24. ------------------------------------------------------------------------
  25.  
  26. For the record, ASSQ is flawed in the same way.
  27.  
  28.  
  29. Jim Miller
  30. Computer Thought, Dallas
  31. jmiller@ctvax.csnet
  32. ...!convex!ctvax!jmiller
  33.  
  34.