Missing '(' error

Discussion in 'Questions (Windows Mobile)' started by petrbury, May 22, 2007.

  1. petrbury

    petrbury Member Licensed User

    I have a problem with my program in version 5. In version 4 it works, but in new version I'm getting an error message :
    Error description: Missing '(' after array variable.
    For i= 0 to ArrayLen(DecInput) - 1

    This is a part of program where error occurs.

    Sub Globals
    Dim DecInput(100)
    End Sub

    Sub App_Start
    DecInput() = serial.InputArray

    For i = 0 to ArrayLen(DecInput) - 1
    Next i
    End Sub

    Could anybody help me, please ? :sign0085:

  2. wolfgang

    wolfgang Member Licensed User

    Hi petrbury,
    this should work
    For i = 0 to ArrayLen(DecInput()) - 1
  3. Cableguy

    Cableguy Expert Licensed User

    I dont think you need the ArrayLen(DecInput) - 1 as by defenition arraylenght is from 0 to arraylenghth-1

    so in your case arraylen is 99

    Try the followin:


    it shoul give you 99
  4. petrbury

    petrbury Member Licensed User

    Thank you Wolfgang, I just wanted edit my question - I found it allready . It was my mistake ( but in version 4 it worked).
    I wonder how many errors are waiting for me in my old applications :sign0161: .
  5. petrbury

    petrbury Member Licensed User

    Hi Cableguy,
    in my case the array DecInput is filled from serial com, so I don't know how many bytes are in it. That's the reason I use this way.
  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