Shop OBEX P1 Docs P2 Docs Learn Events
Compile Error on Timer.SXB example — Parallax Forums

Compile Error on Timer.SXB example

MikeSMikeS Posts: 131
edited 2005-08-20 02:43 in General Discussion
I am getting the following compile error when I try to compile the TIMER.SXB project and am not sure why.

TIMER.SXB(116) Line 116, Error 8, Pass 1:INVALID PARAMETER "DigiMap"

This line in the program is highlighted in yellow.

READ DigMap + digPntr, DigCtrl··············· ' update digit control


I am using IDE 3.1 and the TIMER.SXB is dated 07 July 2005.

Any assistance would be appreciated.

Comments

  • BeanBean Posts: 8,129
    edited 2005-08-19 23:35
    Is it "DigiMap" or "DigMap" ?
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • MikeSMikeS Posts: 131
    edited 2005-08-20 00:10
    Bean,

    It is DigMap. I typed the error message wrong.

    TIMER.SXB(116) Line 116, Error 8, Pass 1:INVALID PARAMETER "DigMap"

    DigMap is a label for the start of the DATA statements.
  • BeanBean Posts: 8,129
    edited 2005-08-20 02:04
    Mike,
    Please post the complete program.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • BeanBean Posts: 8,129
    edited 2005-08-20 02:13
    Oops, If I would actually READ you are referring to the timer example in the help.
    What happened is that the SX/B "READ" command now has a requirement that the label be defined before the code that uses it.
    This is because READ now allows you to use two variables OR a label and a variable. If you didn't define the label before the command it wouldn't know if you had misspelled a variable name, or if it was a label that had not been defined yet.

    You need to move the data table before the READ command that uses it.

    Now it's a little more complecated because no code or data can be before the INTERRUPT command. I fixed it like this:
    '
    INTERRUPT
    GOTO ISR_Start

    DigMap: ' digit select map
    DATA %11111110
    DATA %11111101
    DATA %11111011
    DATA %11110111

    ISR_Start:
    '

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    Product web site: www.sxvm.com

    "One experiment is worth a thousand theories"
    ·
  • MikeSMikeS Posts: 131
    edited 2005-08-20 02:43
    Bean,
    Thanks alot for your help.
    I figured the problem might have been the READ statement in the ISR. comming before the DATA statements but I was not sure how to correct it.

    thanks again

    Mike S.
Sign In or Register to comment.