[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: About babel and header arguments
From: |
Byung-Hee HWANG |
Subject: |
Re: About babel and header arguments |
Date: |
Sun, 10 Apr 2022 20:18:59 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (aarch64-unknown-linux-gnu) |
<tomas@tuxteam.de> writes:
> On Sun, Apr 10, 2022 at 11:53:51AM +0200, Henrik Frisk wrote:
>> Hi,
>>
>> I'm not a skilled (scheme) programmer so maybe there is something obvious
>> I'm missing here. In the first example the header argument y is interpreted
>> as I would expect it, but in the second it isn't:
>
> Hm. You are expecting (12 10)?
>
>> #+begin_src scheme :var y=10 :results value
>> (+ 10 y)
>> #+end_src
>>
>> #+RESULTS:
>> : 10
>>
>> but not this:
>>
>> #+begin_src scheme :var y=10 :results output
>> ((lambda (x) (display x)) '(12 y))
>> #+end_src
>
> The quote extends to the whole (parenthesized) expression, i.e.
> the y is quoted too, in there, so it's the symbol y, so that
> output is correct:
>
>> #+RESULTS:
>> : (12 y)
>
> (That's Scheme, not Babel doing it). I don't know where you
> want to go to, but perhaps try:
>
> (list 12 y)
>
> instead: this would make a list of whatever 12 evaluates to (this
> would be 12) and y evaluates to (this would be 10).
>
> Cheers
Hellow tomas!
Always i learn from you, very good lecture!
Thanks again ^^^
Sincerely, Gnus and Org-mode fan Byung-Hee
--
^고맙습니다 _救濟蒼生_ 감사합니다_^))//