emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exchanging variables between Calc and Embedded Calc


From: Jay Belanger
Subject: Re: Exchanging variables between Calc and Embedded Calc
Date: Mon, 27 Aug 2012 16:04:49 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

> Is it possible, from "calc" to read embedded calc variables?
...
> myVariable := 1.5 + 13 => 14.5
...
> If I switch to "calc mode" (C-x * c), how can I get access to "myVariable"?
>
> From the embedded calc manual:
>
> "The assignment operator `a := 17' does not actually do anything by itself. 
> But
> Embedded Mode recognizes it and marks it as a sort of file-local definition of
> the variable."

If you have something like
x := 4
in embedded Calc, then you can use calc-store (s s RET) to assign the
value 4 to x in Calc.  You can then use calc-evalto (s =) to get
x := 4 =>
In your case, though, while this would assign 14.5 to myVariable in
Calc, it would also leave you with
myVariable := 14.5 => 14.5
in embedded Calc.

> How can I access these "file-local definitions"?  Also, is it possible to set
> "embedded" calc variables from calc?

If a variable has a value in Calc and it isn't overridden in embedded
Calc, then the variable will have the same value in embedded Calc.

Jay



reply via email to

[Prev in Thread] Current Thread [Next in Thread]