![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
if i write this : lat = GPS.latitude gradi = SubString(lat,0,2) minuti = SubString(lat,2,2) secondi = SubString(lat,5,4) secondi = (minuti*0.6-Int(minuti*0.6))*60+secondi*0.0036 i obtain the FormatException error : why? |
|
|||
|
If i show only the lat variable, i obtain 4019.671835
The latitude is correct. The error is in the last line : secondi = (minuti*0.6-Int(minuti*0.6))*60+secondi*0.0036 and i obtain the same error if i use a calculation in an other line, for example : minuti = SubString(lat,2,2) * 0.6 It seem that b4ppc don't convert the SubString function in number... |
|
|||
|
I solved my problem thanks to an old answer of Erel (simply, the best)!
When the GPS not send data, the gps.latitude variable is empty and i have my error! I must check if gps works (with the status property) and all work fine!!!! Wowwwwwwwww!!! ![]() |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Petite question sur la conversion d'un code VB6 en Basic4ppc | GallyHC | French Forum | 11 | 05-27-2008 02:25 PM |
| How Is This Conversion An Error? | Louis | Bug Reports | 3 | 11-20-2007 09:02 AM |
| Conversion and trig functs | bdiscount | Additional Libraries | 0 | 10-08-2007 04:55 PM |
| Numeric conversion limitation? | agraham | Bug Reports | 5 | 07-06-2007 06:08 PM |