Syntax error


Closed Thread
Results 1 to 3 of 3

Thread: Syntax error

  1. #1

    Default Syntax error

    Can anyone tell me what is wrong with this ...

    hserout [hex2 S[(((L-1)*8)+cnt)]]

    It throws a compiling error "Expected ']' or ')']'
    Syntax error


    There are equal numbers of brackets...?

    MW

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,521


    Did you find this post helpful? Yes | No

    Default Re: Syntax error

    Hi,
    That just looks wrong....What's it supposed to do?
    I don't think you should use square brackets "inside" the actual statement, only enclosing it - and perhaps there's a missing comma?
    Code:
    HSEROUT [hex2 S, (((L-1)*8)+cnt)]
    But again, not easy to say withoyt knowing what's it supposed to do.

    /Henrik.

  3. #3


    Did you find this post helpful? Yes | No

    Default Re: Syntax error

    Hi - Thanks for your reply. Tried it again having replaced all but the outermost brackets with ( or ) and it has fixed it. Of course, now I get some different errors. Haven't a clue what I'm doing really! If I get stuck again "I'll be back!" as they say. It's a bit of a steep learning curve after VB6. MW

Similar Threads

  1. Compile error & syntax error on the word "loop:" as a label?
    By jellis00 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th March 2010, 04:14
  2. syntax error
    By malc-c in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 21st February 2010, 21:06
  3. syntax error
    By Gerd in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 8th June 2008, 01:49
  4. 16F819 syntax ERROR
    By k-hirayama in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 5th February 2008, 00:40
  5. OPTION_REG = $7f syntax error
    By ttease in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th April 2007, 20:05

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts