flat assembler
Message board for the users of flat assembler.
Index
> Compiler Internals > Nested macro silliness bug: |
Author |
|
l_inc 05 Jul 2013, 14:37
bitRAKE
Quote: The following code silently errors: There's no error there. The example is a little convoluted, so I assume you outsmarted yourself. Basically, you're running irp for each argument (because no common directive is used). With the very last argument the most outer irp is called like this: Code: irp Z,3,<<1,0>,2>{T Z} With the first iteration you invoke on the same level redefined T macro. But because the macro redefines itself, when invoked, the second iteration uses the most internal T macro, which contains the display directive only. Thus the second (and therefore the last) iteration of the last irp invokes the most inner redefinition: T<1,0>,2 => display '1',0 display '2' As you terminated the output with non-stringified 0, no further output is displayed. _________________ Faith is a superposition of knowledge and fallacy |
|||
05 Jul 2013, 14:37 |
|
bitRAKE 05 Jul 2013, 16:35
l_inc wrote: The example is a little convoluted, so I assume you outsmarted yourself. _________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
05 Jul 2013, 16:35 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.