Hello everybody,
I have traced down a problem in a big part of code to the following
strange behaviour of sort:
Allegro CL 4.3 [SPARC; R1] (4/5/96 19:24)
Copyright (C) 1985-1996, Franz Inc., Berkeley, CA, USA. All Rights Reserved.
; Loading /usr/local/acl4.3/home/code/ipc.cl
;; Optimization settings: safety 1, space 1, speed 1, debug 2.
;; For a complete description of all compiler switches given the
;; current optimization settings evaluate (EXPLAIN-COMPILER-SETTINGS).
USER(1): (setf ll '("a" "f" "d" "c"))
("a" "f" "d" "c")
USER(2): (sort ll #'string<)
("a" "c" "d" "f")
USER(3): ll
("a" "c" "d" "f")
USER(4): (setf ll (cons "b" ll))
("b" "a" "c" "d" "f")
USER(5): (sort ll #'string<)
("a" "b" "c" "d" "f")
USER(6): ll
("b" "c" "d" "f")
Certainly this might be encompassed by always doing an explicit setf after
sorting. But with this strange effect I would like to know whether the
return value of sort is guaranteed to be correct.
Greetings
Bjoern
*******************************************************************************
Dipl.-Inform. Bj"orn H"ofling * Otto-von-Guericke Universit"at Magdeburg
Phone: +49 391 67 18055 * FIN/IIK
Fax: +49 391 67 12018 * Universit"atsplatz 2
* D - 39106 Magdeburg (Germany)
*******************************************************************************
E-mail: <iik.cs.uni-magdeburg.de at hoefling>
WWW: http://www-ai.cs.uni-magdeburg.de/~hoefling
*******************************************************************************