Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parser bug (*solved*)
#1
Trying to compile the following code:
Code:
#define BIFROSTstop() \
    asm               \
        call 65012    \
    end asm

10 PAUSE 0 : BIFROSTstop() : PAUSE 0
Produces the following error message:
Quote:illegal character ':'
However the following code compiles just fine:
Code:
#define BIFROSTstop() \
    asm               \
        call 65012    \
    end asm

10 PAUSE 0 : BIFROSTstop()
   PAUSE 0
This bug is relevant because BIFROST* interface library for ZX BASIC makes extensive use of defines as above, for performance reasons. I'm sure this is not the only case. Therefore I'm concerned about users getting confused by weird errors like this.
Reply
#2
Hmmm. It's a parser bug due to the mix of pre-processing and BASIC parsing. Will check it. Thanks! :roll:

Just for clarification: Not sure what you meant by "performance reasons", but obviosly using the colon or newline is the same for the compiler (there's no performance impact; it's just cosmetic syntax).

Will fix it asap.
Reply
#3
boriel Wrote:Just for clarification: Not sure what you meant by "performance reasons"
I just meant that using a "define" has better performance (less overhead) than calling a function or sub-routine, for simple cases like in this example above.

boriel Wrote:Will fix it asap.
Thanks!
Reply
#4
Okay. It was a bug in the preprocessor. Can you download version 1.3.0s979 and check it please? :roll:
Reply
#5
boriel Wrote:Okay. It was a bug in the preprocessor. Can you download version 1.3.0s979 and check it please? :roll:
It's working now. Thank you!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)