| Reply | « Previous Thread | Next Thread » |
|
Hi all,
Bit of a newbie, so bear with me. I've written a program in Python 3.0 which I'm trying to change to PyS60. To simplify my question, if I run the following code in Python 3.0: Quote:
If I run it in PyS60, it returns 0. Obviously, in Python 3.0, x is interperated as a floating point, whereas is PyS60 it's an integer. I could get around the problem using the float() function, or by changing the first line to x=20.0, but as I have several hundred lines of code to wade through I was hoping there might be an easier way. In other words, how do I force Python to recognise variable assignments as floating point. Cheers
Last edited by 5 line screamer : 2009-03-13 at 10:50.
|
| 5 line screamer |
| View Public Profile |
| Find all posts by 5 line screamer |
|
Quote:
http://discussion.forum.nokia.com/fo...43&postcount=2 Shortly: Code:
from __future__ import division -- Aapo Rista http://code.google.com/p/pys60gps/ http://opennetmap.org/ |
|
Thanks for your help
|
| 5 line screamer |
| View Public Profile |
| Find all posts by 5 line screamer |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Entering floating point numbers | rihoe | Symbian User Interface | 0 | 2008-08-26 13:14 |
| java.lang.VerifyError when using floating point numbers? | camroe | Mobile Java Tools & SDKs | 2 | 2005-01-28 17:43 |
| Nokia 3650 & floating point numbers | hoyuka | General Symbian C++ | 1 | 2004-09-30 20:23 |
| Floating point numbers / Angle between points | Pandaemonium | Mobile Java General | 8 | 2004-03-10 17:02 |
| Floating point numbers | donalucc | Mobile Java General | 2 | 2003-02-17 12:01 |