Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Array of addresses
britlion Wrote:I'm trying to make an array of sprite pointers.

The compiler doesn't seem to like

DIM Sprites(5) AS uInteger => {@sprite1,@sprite2,@sprite3,@sprite4,@sprite5,@sprite6}

And I'm not quite sure why. It reports the error: Initializer expression is not constant. - and I beg to differ. I thought @label WAS a constant?
The compiler does not currently support this. Sorry. It's constant, as you say, but hard to know in compiler-time. Think of how will you code this array in asm:
Db _sprite1????
Even the assembler does not support this (yet). There should be a mechanism to make a DB/DW to contain an expression. I will have a look on it, but it will be for version 1.2.7 or newer. 1.2.6 needs to be closed. Only bitwise operations are still pending...

Messages In This Thread

Forum Jump:

Users browsing this thread: 1 Guest(s)