Page 1 sur 1

Store conversion in variable

Message non luPosté: 10 Oct 2023, 00:33
de eduaqa
How to I store the result of a conversion to a variable
example:

Disp 10*_mi▶_km <<<< This work
A:=10*_mi▶_km <<< This generate syntax error

Actually I would like to have in a variable the result of "Avariable"*_mi▶_km/_gal▶_l. -> store to B

I used to do this on the 86 without problem , but here I'm not finding how.

Re: Store conversion in variable

Message non luPosté: 10 Oct 2023, 13:43
de Adriweb
Not really possible because the conversion is just at the display/visual level... but it also depends what you want to do with it.
A workaround is to do like this:

Image

Then the variable a will contain a simplified (because the Nspire always auto-simplifies) version of the result: 16093.44*_m.

If you really wants to have the "km" version in a variable (although it will be forced to be a string one), it can be done with some workarounds via a lua script...