keep the answer + use answer in next

Go down

keep the answer + use answer in next

Post  richardao on Tue Sep 20, 2011 6:55 pm

Using the Smart Math Calculator, can I save the answer and carry it down to the next problem without copy & paste?
10 + = 15
10 = 20
20 5

richardao

Posts : 5
Join date : 2011-09-20

View user profile

Back to top Go down

Re: keep the answer + use answer in next

Post  runiter on Tue Sep 20, 2011 8:18 pm

Hi richardao,
Yes you can do that simply by saving the result in a variable and reusing that variable:

a=10+5
a+3

In above lines, a+3 will result in 18.

Does it answer your question?

We are considering making it easier in next release by allowing this:

10+5
+3

The above would result in 18 as well. Do you prefer this way better?

_________________
Saeid Nourian, Ph.D.
President of Runiter Company
http://www.runiter.com
avatar
runiter
Admin

Posts : 132
Join date : 2007-12-05
Age : 37
Location : Boston, MA, USA

View user profile http://www.runiter.com

Back to top Go down

Re: keep the answer + use answer in next

Post  richardao on Tue Sep 20, 2011 9:39 pm

thank you for the answer...
the second example 10+5+3 I can do now.
what I want to do is print out:
10+5 = 15
15+3 = 18

richardao

Posts : 5
Join date : 2011-09-20

View user profile

Back to top Go down

Re: keep the answer + use answer in next

Post  runiter on Tue Sep 20, 2011 11:16 pm

What I meant was that in the first line you type 10+5

Then in the second line you type +3

After you type +3 it would automatically release that you like it to to be added to previous line and convert it to 15+3

This is an idea that we may implement in a future version.

For now you can simply define variables to do a same thing.
In Smart Math Calculator type:

a=10+5
3+a

_________________
Saeid Nourian, Ph.D.
President of Runiter Company
http://www.runiter.com
avatar
runiter
Admin

Posts : 132
Join date : 2007-12-05
Age : 37
Location : Boston, MA, USA

View user profile http://www.runiter.com

Back to top Go down

now I understand - thanks

Post  richardao on Tue Sep 20, 2011 11:31 pm

Thanks for you answer.
Sincerely,
Richard O.

richardao

Posts : 5
Join date : 2011-09-20

View user profile

Back to top Go down

three correct answers then wrong number

Post  richardao on Wed Sep 21, 2011 4:40 am

Using the Calculator on this web site:
first three had correct answer
In the fourth: d=c+10
c is not 29 , c = 299792458
a=10+5 15
b=a+3 18
c=b+11 29
c 299792458 [c is not 29 but 299792458]
d=c+10 299792468

tried the following:
d=a+b+c 299792491
Do not know why 29 became 299792458


richardao

Posts : 5
Join date : 2011-09-20

View user profile

Back to top Go down

Re: keep the answer + use answer in next

Post  runiter on Wed Sep 21, 2011 10:38 am

richardao wrote:d=a+b+c 299792491
Do not know why 29 became 299792458
The problem is that c also happened to be the constant for the "speed of light" which is 299 792 458 m/s (see the "c" button on the right side of the keypad in Smart math calculator).

I will fix this problem in the next version so that if you defined your own variable c which has a same name as another variable, then your defined variable should take priority.

For now avoid using "c" or any other reserved variable name as the name of variable. Try "d" instead in this case.
avatar
runiter
Admin

Posts : 132
Join date : 2007-12-05
Age : 37
Location : Boston, MA, USA

View user profile http://www.runiter.com

Back to top Go down

thanks

Post  richardao on Wed Sep 21, 2011 11:32 am

thank you

richardao

Posts : 5
Join date : 2011-09-20

View user profile

Back to top Go down

Alternative for answer

Post  bsborden on Mon May 19, 2014 3:13 pm

Assign the answer to a variable - either "a" or "ans". I would also recommend that builtins (such as c for the speed of light) be renamed with some symbol that sets them apart, such as @c.

bsborden

Posts : 1
Join date : 2014-05-19

View user profile

Back to top Go down

Re: keep the answer + use answer in next

Post  runiter on Wed May 28, 2014 11:24 pm

bsborden wrote:Assign the answer to a variable - either "a" or "ans".
The answer of a previous line is always stored in ~ if you don't assign it to any other variable. So if you type 4*5 in the first line and type ~+1 in the second you get 21 as answer of the second line.

bsborden wrote:I would also recommend that builtins (such as c for the speed of light) be renamed with some symbol that sets them apart, such as @c.
The speed of light is already renamed to SpeedOfLight instead of c.
Also the problem mentioned by original author is now fixed. So if you have a variable name define in your file with same name as global variable then the one you define in your file takes priority.

_________________
Saeid Nourian, Ph.D.
President of Runiter Company
http://www.runiter.com
avatar
runiter
Admin

Posts : 132
Join date : 2007-12-05
Age : 37
Location : Boston, MA, USA

View user profile http://www.runiter.com

Back to top Go down

Re: keep the answer + use answer in next

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum