Use of cPI?

Discussion in 'Questions (Windows Mobile)' started by cdeane, Aug 7, 2008.

  1. cdeane

    cdeane Member

    I need to add 3 to the sum of pi.

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

    klaus Expert Licensed 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.
  3. cdeane

    cdeane Member

    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.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice