Hi Marco,

On 18.03.20 15:47, Marco Wahl wrote:
Okay. I take here the "any advice is appreciated" part.
AFAICS at the org babel calc evaluation the last value of the calc stack
gets dropped.

So your workaround is okay, I think.  You can just write any dummy
element at the bottom of each block e.g. just 0.  No need of
duplication.  Looks a bit hackish to me but so what?
Oh no. You're completely right. This simplifying clarification is already quite helpful. Just putting 0 on top of stack is enough. Terrifying simple.
Another approach could be "noweb".  Example (you would just evaluate the
block at the bottom):

--8<---------------cut here---------------start------------->8---
Number of cars (PKW) in germany:

#+name: numcars
#+begin_src calc :exports both
45e6
#+end_src

Yearly mileage in [km/y]

#+name: mileage
#+begin_src calc :exports both
15000
#+end_src

Calculate amount of complete km per year

#+begin_src calc :noweb yes
<<numcars>>
<<mileage>>
'*
#+end_src
--8<---------------cut here---------------end--------------->8---


HTH,
-- Marco

From my point of view "variablizing" distracts me to much. I'd prefer more to comment via "literate" description of the numbers.

Reply via email to