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

return value of FUNCALL



hey there,

i suppose some problem of my understanding of lisp (or something
wrong in clisp)? however,

> (lisp-implementation-type)
"CLISP"
> (lisp-implementation-version)
"1996-04-17 (April 1996)"

on Linux ifm-pc31.mb.uni-magdeburg.de 1.99.4 #1-pre-2.0 Thu Oct 10
12:59:25 MET DST 1996 i586.

basically i have a list of function names of functions that return
T in case of succes and NIL (the default) otherwise. i preassume
that FUNCALL always returns what its argument returns. so when i
process the function list using DOLIST as in

(dolist (runner *LISTE*)    ;; 3 items in the list
  (print (funcall runner)))

i will find some output like:

...
T    ;; 1. fu
T    ;; 2. fu
NIL  ;; 3. fu
...

etc. for every function called, the first two bodies being
executed.

but what happened was output of TWO return values of FUNCALL
sometimes (for certain orders of the functions in the list).
namely T (for the function) and a NIL afterwards like:

...
T   ;; 1. fu
NIL
T   ;; 2. fu
NIL ;; 3. fu

well, checking the execution of the function bodies by watching
the output of FUNCALL is a bad idea?
by the way, MAPCAR works fine:

(mapcar #'funcall *LISTE*) ==> (T T NIL)

no matter how i put the order of the function names in the list.

i was reading winston/horn and steele, but nothing was said
about FUNCALL multiple return values, at least FUNCALL return
values.

any ideas?
thanks for your time, peter

-------------------------------------------------------------
Dipl.-Ing. Peter Wehner 
Institut fuer Mechanik   Otto-von-Guericke-Universitaet Magdeburg 
Universitaetsplatz 2     D-39106 Magdeburg
Tel. 0391/67-12296       Fax. 0391/67-12439
e-mail : peter.wehner@mb.uni-magdeburg.de
www: http://comserv.urz.uni-magdeburg.de/~wehner/