flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Suggestion/request |
Author |
|
Joshua 01 Aug 2004, 10:25
Priv,
Instead of returning 'error: undefined symbol' on a line like the following, perhaps it is possible to initialise it to blank? (perhaps same for equ and fix) Ex: Code: A = A + 1 -> Error -> A = + 1 -> A = 1 Code: A = 5 -> A = 5 A = A + 1 -> A = 5 + 1 -> A = 6 Code: B = A + 1 -> Error I know that this can in most cases be emulated with: Code: local here if ~defined A | defined here A = 1 here = 0 else A = A + 1 end if http://board.flatassembler.net/topic.php?p=4322&highlight=#4322 |
|||
01 Aug 2004, 10:25 |
|
Tomasz Grysztar 01 Aug 2004, 11:33
I've got a better idea: let the "defined" work the old way specifially with the redefined constants - this will make it even more logical, as those constants cannot be forward-referenced, too, so checking only for backward definition is indeed more suitable for them.
I'm currently testing whether it doesn't cause any problems, it solves your trouble with the code like: Code: if ~ defined a a = 0 end if a = a + 1 |
|||
01 Aug 2004, 11:33 |
|
Tomasz Grysztar 01 Aug 2004, 11:46
It seems that it works good. The 1.54 release has been updated to include this change. The new behavior of "defined" can be described simply as: it checks whether the symbol has been defined and is accessible from the current position.
|
|||
01 Aug 2004, 11:46 |
|
Joshua 01 Aug 2004, 23:52
Perfect!
|
|||
01 Aug 2004, 23:52 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.