03-23-2010, 07:59 AM
There *is* in fact a line number bug. It's in the inline assembly.
If you try to compile that, you'll be pointed at line 1 for errors, when in fact it's in line 19.
Over a reasonably large program, with includes and lots of documentation, the place you can be told "Unexpected Token" can be a very very long way away from the real number. Apparently comments aren't counted as lines for that error - I'm guessing they are pre-parsed out by that point.
Sorry if this isn't going to be trivial to solve!
Code:
asm
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
;THIS IS A COMMENT
LD F,F
end asm
If you try to compile that, you'll be pointed at line 1 for errors, when in fact it's in line 19.
Over a reasonably large program, with includes and lots of documentation, the place you can be told "Unexpected Token" can be a very very long way away from the real number. Apparently comments aren't counted as lines for that error - I'm guessing they are pre-parsed out by that point.
Sorry if this isn't going to be trivial to solve!