Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Beta Versions
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Beta Versions This forum is the place to discuss issues regarding Basic4ppc beta versions.


string ?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2010, 06:29 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 604
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default string ?

I got an error on this and I don't inderstand it:

Code:
direction = (tc /DtoR + 540)Mod(360)
all variables here are defined as numbers, DToR = cPI/180,
tc = ACos((Sin(s_lat)-Sin(f_lat)*Cos(d))/(Sin(d)*Cos(f_lat)))


Edit: - found it, direction was already declared as global, but still, the message text is not directing to the problem.
Attached Images
File Type: jpg gpsd.jpg (25.3 KB, 12 views)
__________________
David Erez
Ramat Hasharon, Israel

Last edited by derez : 03-02-2010 at 03:47 AM.
Reply With Quote
  #2 (permalink)  
Old 03-02-2010, 08:18 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,839
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I can't reproduce that error from the information given as it shouldn't matter that direction was already a global and you should get an error if you try to redeclare it as a local. It should also work whether direction was declared as a default, String or Number type. So I'm wondering what the real reason for that error is
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #3 (permalink)  
Old 03-02-2010, 11:00 AM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 604
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

You are right, the problem was that I had two variables named direction , one was global and the other - local.

The compiler solved some mishaps that I had with the other variable.

solved by changing the name.
__________________
David Erez
Ramat Hasharon, Israel
Reply With Quote
  #4 (permalink)  
Old 03-03-2010, 07:54 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 3,839
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

Sory, I don't think I have made myself clear. I would be interested to see if you could reproduce that error and post the code as I don't think it should be possible, using regular variables, for that error to have occurred at compile time. If you locally redeclared a global variable you should have got a redeclaration error at compile time and if you were assigning a number to a string variable Basic4ppc should have emitted the code to convert it and you wouldn't get an error until runtime if it were not possible.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #5 (permalink)  
Old 03-03-2010, 08:06 PM
derez's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Posts: 604
Awards Showcase
Beta Tester Competition Winner 
Total Awards: 2
Default

I can reproduce the error:
direction is global with value ( not defined as Number)

In a sub, direction is defined (again), but as Number.
when assigning direction the error appears in compilation (I don't know what happens when running from IDE because this program can run on device only).

I checked in a simple program - when running the IDE I get error about the re-dclaration of the variable. Compilation brings up the implicit string etc.
__________________
David Erez
Ramat Hasharon, Israel
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
gps data string tremara1 Questions & Help Needed 2 06-02-2009 09:04 AM
Double in blob to string? HARRY Questions & Help Needed 2 12-18-2008 04:14 PM
put byte value into a string cotralis Questions & Help Needed 5 09-13-2008 03:30 AM
Long String Georg Questions & Help Needed 2 08-06-2008 08:20 AM
OK, next string question Stellaferox Questions & Help Needed 9 06-07-2007 01:12 PM


All times are GMT. The time now is 11:45 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0