Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Convert to VB6 in basic4ppc

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2008, 04:08 PM
Junior Member
 
Join Date: Jun 2008
Posts: 40
Thumbs up Convert to VB6 in basic4ppc

Hello,

I'm a french man and i'm sorry for my bad english.

please help me for the convert a code vb6 to basic4ppc (tab). the code is :

'Dim tabCos(-360 To 360) As Single
'Dim tabSin(-360 To 360) As Single

And

'For i=-360 To 360 Step 1
' tabCos(i) = Sin((i/180) * dblPi)
' tabSin(i) = Cos((i/180) * dblPi)
'Next i

thank you,
GallyHC
Reply With Quote
  #2 (permalink)  
Old 05-26-2008, 04:26 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,733
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Arrays index in Basic4ppc always start from 0.
It is better to declare the arrays as Double in Basic4ppc because all internal calculations are done with this type.
Code:
Sub Globals
    
Dim tabCos(721As Double
    
Dim tabSin(721As Double
End Sub

Sub App_Start
    
For i = -360 To 360 Step 1
        tabCos(
360 + i) = Sin((i/180) * cPi'cPi is a constant (3.1415...)
        tabSin(360 + i) = Cos((i/180) * cPi)
    
Next
End Sub
Reply With Quote
  #3 (permalink)  
Old 05-26-2008, 05:22 PM
Junior Member
 
Join Date: Jun 2008
Posts: 40
Default

Thank for the responce ;-)
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I convert a string to an integer dahljam Questions (Windows Mobile) 4 10-12-2008 07:32 PM
convert asc to ov2 JJM Questions (Windows Mobile) 2 07-26-2008 06:59 AM
Convert Any Database to SQLite (source & exe) dzt Code Samples & Tips 6 02-28-2008 07:39 AM
Convert DecimalLatitude to Latitude schimanski Questions (Windows Mobile) 1 01-11-2008 11:32 PM
Convert VB lib to B4P lib ? conf Questions (Windows Mobile) 1 05-27-2007 11:43 AM


All times are GMT. The time now is 09:36 AM.


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