Convert to VB6 in basic4ppc

Discussion in 'Questions (Windows Mobile)' started by GallyHC, May 26, 2008.

  1. GallyHC

    GallyHC Member

    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    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
     
  3. GallyHC

    GallyHC Member

    Thank for the responce ;-)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice