; From: Ihor Radchenko
> Subject: Re: LIterate programming with calc (help)
> Date: Tue, 01 Nov 2022 07:22:18 +
"Fraga, Eric" writes:
>/> I guess that the main problem is that calc is ti
Just in case you find this package interesting. Except some problems
with units conversion, it's nice:
https://github.com/sulami/literate-calc-mode.el
This is a literate calc file.
Lines without "=" are ignored.
All results starting with "=>" are an overlay generated by
literate-calc-mode.
"Fraga, Eric" writes:
>> I guess that the main problem is that calc is tightly integrated with
>> interactive commands. Maybe ob-calc could be extended to somehow
>> indicate the commands to be executed in addition to inputting stack
>> entries.
>>
>> Not sure if there is much interest in such
On Monday, 31 Oct 2022 at 09:23, Ihor Radchenko wrote:
> I looked into ob-calc and it looks like the way to define variables is
> via :var header argument.
Indeed. Something like :var a="300 m" does work.
> I guess that the main problem is that calc is tightly integrated with
> interactive
Ypo writes:
> Would it be something like this?
>
> #+begin_src calc
> a = 300 m
> b = 300 m
> Area = a*b
> cost = 1 ($/m^2)
> A*c
>
> #+end_src
I looked into ob-calc and it looks like the way to define variables is
via :var header argument.
Other than that, ob-calc simply does
On Monday, 24 Oct 2022 at 13:26, Ypo wrote:
> Why do you think it doesn't work something more human readable like this?
>
> #+begin_src calc
>solve([
>a = 300 m,
>b = 300 m,
>Area = a*b,
>cost = 1 (USD/m^2),
>
Not bad, thanks!!!
Why do you think it doesn't work something more human readable like this?
#+begin_src calc
solve([
a = 300 m,
b = 300 m,
Area = a*b,
cost = 1 (USD/m^2),
z = Area*cost
],
Fraga, Eric writes:
> On Monday, 24 Oct 2022 at 09:20, Ihor Radchenko wrote:
>> I vaguely recall that storing variables in calc is something like
>> variable := assignment (which is actually rewrite rule, but that's how
>> 13.1 Storing Variables section of the calc manual explains variable
>>
"Fraga, Eric" writes:
> On Sunday, 23 Oct 2022 at 14:15, Ypo wrote:
>> Is it possible to express in a calc block some basic operations with
>> variables and non-predefined units?
>
>> Why A*c won't show an arithmetic result, but ~: A c ~?
>
> I've never managed to get calc blocks define
On Monday, 24 Oct 2022 at 09:20, Ihor Radchenko wrote:
> I vaguely recall that storing variables in calc is something like
> variable := assignment (which is actually rewrite rule, but that's how
> 13.1 Storing Variables section of the calc manual explains variable
> assignments).
That is true
On Sunday, 23 Oct 2022 at 14:15, Ypo wrote:
> Is it possible to express in a calc block some basic operations with
> variables and non-predefined units?
> Why A*c won't show an arithmetic result, but ~: A c ~?
I've never managed to get calc blocks define variables. The equations
you have typed
11 matches
Mail list logo