Use of cPI?

cdeane

Member
I need to add 3 to the sum of pi.
ex:
Table2.Cell("bot",0)=cPI

Table2.Cell("bot",0)=cPI could equal 15.916 and then I need to add 3 so it would equal 18.916
 

klaus

Expert
Licensed User
Longtime User
You can use cPI like any other constant.

To add 3 to cPI just write Table2.Cell("bot",0)=cPI+3
or Table2.Cell("bot",0) = Table2.Cell("bot",0)+3

I don't really understand your question, because if
Table2.Cell("bot",0)=cPI it's content is 3.14159... and cannot be 15.916 or anything else.

cPI is NOT a variable, you cannot change it's value, thats what constants are made for.

If you need to make different operations with PI you must define a variable or use the cell content.

Best regards.
 

cdeane

Member
To add 3 to cPI just write Table2.Cell("bot",0)=cPI+3
or Table2.Cell("bot",0) = Table2.Cell("bot",0)+3

Your right klaus.That is what I've been doing.
In my haste I seem to prematurely assumed cPI+3 was the one giving me problems and therefor was the culprit.I was wrong.
It is elsewhere in my code.I am looking for the troubled area as we speak.

By the way 15.916 was the PI of a random number I picket(50).

My bad.
 
Top