From: "Harold Lee" <harold3@gmail.com>
Subject: Re: Newbie: references in elisp
Date: 23 Jan 2007 16:58:30 -0800 [thread overview]
Message-ID: <1169600310.197134.174930@j27g2000cwj.googlegroups.com> (raw)
In-Reply-To: <mailman.3471.1169572533.2155.help-gnu-emacs@gnu.org>
On Jan 23, 9:12 am, Pawel <n...@wp.pl> wrote:
> Hallo group members!
> I want my function return one than one element. I C I do it using references. Is there something like reference in elisp? .. or maybe I should use lists with some additional trick?
I guess you mean returning more than one value? Try
MULTIPLE-VALUE-BIND, taken from Common Lisp:
http://www.lisp.org/HyperSpec/Body/mac_multiple-value-bind.html
Thus you can define a function that returns multiple values:
(defun f () (values 1 2))
And get at the values like this:
(multiple-value-bind (a b)
(f)
(format "a is %d and b is %d" a b))
next prev parent reply other threads:[~2007-01-24 0:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.3471.1169572533.2155.help-gnu-emacs@gnu.org>
2007-01-23 20:24 ` Newbie: references in elisp Andreas Roehler
2007-01-23 20:24 ` Andreas Roehler
2007-01-24 0:58 ` Harold Lee [this message]
2007-01-23 17:12 Pawel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1169600310.197134.174930@j27g2000cwj.googlegroups.com \
--to=harold3@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.