[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ask for the value of several variables at once
From: |
tomas |
Subject: |
Re: ask for the value of several variables at once |
Date: |
Fri, 9 Mar 2018 10:19:59 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Mar 09, 2018 at 09:32:07AM +0100, Emanuel Berg wrote:
> Emanuel Berg wrote:
>
> > OK, but better (and much more difficult) to do
> > a function/macro which is used like this,
> > NB with no string or quotes to protect the
^^^^^^^^^^^^^^^^^^^^^^^^
it has to be a macro then...
> > original symbols:
> >
> > (vars-and-values var-1 ... var-n)
> >
> > which should give a list:
> >
> > (var-1 var-1-value ... var-n var-n-value)
> >
> > or
> >
> > ((var-1 var-1-value) ... (var-n var-n-value))
> >
> > Do it today - in a different way :)
>
> This is how far I got - next step to make it
> work with a list of vars...
>
> (defmacro echo-var (var)
> `(list ,(symbol-name var) ,var) )
> ;; (echo-var fill-column) ; ("fill-column" 47)
That's a good first step. The question now is whether to delegate
the looping over the list to a function or not.
Whatever it is what catches the argument list has to be a macro,
due to you "no quotes" requirement...
Thanks
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlqiUb8ACgkQBcgs9XrR2kb4qwCeOaQG1ipnJVZ0uIaIqr7+rFF6
v4QAn1u4p29kGduD8Dnf5C1+on/tD/Su
=NrWL
-----END PGP SIGNATURE-----
- Re: ask for the value of several variables at once, (continued)
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Uwe Brauer, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once,
tomas <=
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Re: ask for the value of several variables at once, Robert L., 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Yuri Khan, 2018/03/09
- Re: ask for the value of several variables at once, Uwe Brauer, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09