Shop OBEX P1 Docs P2 Docs Learn Events
If Then doesn't compile corectly — Parallax Forums

If Then doesn't compile corectly

neely1neely1 Posts: 2
edited 2007-10-31 11:27 in General Discussion
When I use multiple IF Then - Else - EndIf statements the compiler messes up the jump locations.
usually by reusing Else_0 and/or EndIF_0. This causes a ERROR #2. I can correct the list file and
it runs correcty. I've had this problem with multiple programs including the Bit manipulation
functions that I downloaded from this forum. The fact that·others are not·mentioning it,
makes me think it might just be my software.
go figure, thanks, neely1·

Comments

  • BeanBean Posts: 8,129
    edited 2007-10-29 23:07
    Please post the program, I've never seen this happen.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My goal is to live forever...Or die trying.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
  • neely1neely1 Posts: 2
    edited 2007-10-31 05:27
    I was just fooling around with an AT keyboard.

    In the KEY1 code·I did not use the "optional" ELSE statement and the compiler

    added them all with the same label.

    In KEY2 I added the ELSE statements with similar results.

    In KEY3 I corrected the·asembly code and added it to my basic file·as a work around.

    Attached: KEY1.SXB, KEY1.SRC, KEY2.SXB, KEY2.SRC,·KEY3.SXB
  • BeanBean Posts: 8,129
    edited 2007-10-31 11:27
    Okay I see the problem. You are using an old version of the compiler (1.50.01). The current version is 1.51.03 and you can download it from here http://forums.parallax.com/showthread.php?p=597707

    That should take care of the problem.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My goal is to live forever...Or die trying.
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    www.hittconsulting.com
    ·
Sign In or Register to comment.