| Reply | « Previous Thread | Next Thread » |
|
hi all, just a few programming questions:
1. how do I initialize and define an integer variable? 2. how do I serialize/deserialize it so that I can make it keep its value between each time I run the program? 3. how can I perform a square root with double as the return type? That's it for now, I may have more later though... thanx in advance~ ![]() |
|
Hi lraoux and welcome to the forum
![]() 1) in python you don't have to car about the data type. Still you have the choice of using Integers, Floating point numbers and Complex numbers and force there type: Code:
>>>print int(5.15) 5 >>>print float(5) 5.0 2) you can write there value in an external file or the phone database. Then at the startup you read them and load the proper values 3) use the math library Code:
>>>from math import sqrt >>>print sqrt(8) 2.82842712475 LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
ok.. wow thx that helped alot!
but I'm still confused about the 2nd thing. Could you be a little more specific? p.s.: if possible, could we communicate through AIM? my IM is MLsaifer22 |
|
Hi lraoux,
The second point is quite easy to achieve.
LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| wat are the steps involved in making any bluetooth multilplayer game?? | tango85 | Mobile Java General | 8 | 2006-05-09 20:38 |
| Questions from an Independent Game Developer | rorygraves | Mobile Java Games | 4 | 2006-04-19 20:44 |
| Making game for Mobile | vishalrpanchal | Mobile Java General | 1 | 2005-11-09 00:51 |
| Making my game available for download | smb101 | Mobile Java General | 3 | 2004-06-24 15:00 |
| Is Making A Java Game is So Difficult? | Duna | Mobile Java General | 13 | 2003-10-16 16:04 |