Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Use of cPI?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2008, 10:50 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 60
Default Use of cPI?

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
Reply With Quote
  #2 (permalink)  
Old 08-08-2008, 07:47 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Switzerland
Posts: 669
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

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.
__________________
Klaus
Switzerland
Reply With Quote
  #3 (permalink)  
Old 08-08-2008, 08:30 PM
Knows the basics
 
Join Date: Aug 2007
Location: Arkansas
Posts: 60
Default

Quote:
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.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:43 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0