[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug in assoc

The following illustrates a rather unpleasant bug in Franz's ASSOC (as
of 38.26, anyhow).  Be forewarned....


8_(setq l '((a 1) (b 2) (c 3)))	       ;;set up an a-list
((a 1) (b 2) (c 3))

9_(setq foo 'l)			       ;;FOO points to the NAME of the a-list

10_(setq bar 'foo)		       ;;BAR points to the NAME of the NAME of
foo				       ;;the a-list

11_(assoc 'b l)			       ;;This does the right thing
(b 2)

12_(assoc 'b foo)		       ;;Gag me with a mouse -- should err
(b 2)				       ;;with "bad arg to <something>"

13_(assoc 'b bar)		       ;;Double gag me with a mouse!!
(b 2)


For the record, ASSQ is flawed in the same way.

Jim Miller
Computer Thought, Dallas