How can I create a function which will return more than 1 value?
For example, (get-decoded-time), it has 9 different values, we can use
them using (multiple-value-bind), etc.
Alexander Fenster.
In article <········································@crocodile.iis.nsk.su>, Alexander Fenster wrote:
>How can I create a function which will return more than 1 value?
>
>For example, (get-decoded-time), it has 9 different values, we can use
>them using (multiple-value-bind), etc.
Use VALUES:
(defun foo ()
(values 1 2 3))
--
</nathan> ·······@rose-hulman.edu | http://www.rose-hulman.edu/~froydnj/
Yes, God had a deadline. So He wrote it all in Lisp.
In article
<········································@crocodile.iis.nsk.su>,
Alexander Fenster <·······@crocodile.iis.nsk.su> wrote:
> How can I create a function which will return more than 1 value?
>
> For example, (get-decoded-time), it has 9 different values, we can use
> them using (multiple-value-bind), etc.
>
> Alexander Fenster.
>
use VALUES
(values 'a 'b 1 2 3)
--
Rainer Joswig, Hamburg, Germany
Email: ·············@corporate-world.lisp.de
Web: http://corporate-world.lisp.de/
Alexander Fenster wrote:
>
> How can I create a function which will return more than 1 value?
>
> For example, (get-decoded-time), it has 9 different values, we can use
> them using (multiple-value-bind), etc.
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/sec_3-1-7.html
http://www.xanalys.com/software_tools/reference/HyperSpec/Body/acc_values.html#values
--