Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
conflict between "label EQU" and "#DEFINE label"?
#1
I got the following error:

Quote:random.asm:10: Error: Syntax error. Unexpected token '23672' [INTEGER]

I took a look at the random.asm library. Lines 10 are 11 are the following:

Code:
    LOCAL TAKE_FRAMES
    LOCAL FRAMES

And line 31:

Code:
FRAMES EQU    23672

So I suspected the problem had something to do with this line of my program:

Code:
#define FRAMES 23672

I defined FRAMES because I use it for several calculations.

I was right: I renamed it MYFRAMES and the error didn't happen again.

Does it means the EQU assembler labels conflict with #DEFINEd labels?
Reply
#2
programandala.net Wrote:I got the following error:

Quote:random.asm:10: Error: Syntax error. Unexpected token '23672' [INTEGER]

I took a look at the random.asm library. Lines 10 are 11 are the following:

Code:
    LOCAL TAKE_FRAMES
    LOCAL FRAMES

And line 31:

Code:
FRAMES EQU    23672

So I suspected the problem had something to do with this line of my program:

Code:
#define FRAMES 23672

I defined FRAMES because I use it for several calculations.

I was right: I renamed it MYFRAMES and the error didn't happen again.

Does it means the EQU assembler labels conflict with #DEFINEd labels?
That's right. But it's a bug in the RANDOM.ASM file, since it's possible to define local labels using PROC end ENDP as in Pasmo assembler.
I will fix it too.

Update: I was wrong. Random.asm file is Ok. This name collision should not happend since the #define only affects at 1st compiler stage. I will try to debug this...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)