flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 16 Jul 2007, 07:42
of course, because name of sub_test parameter is param, and that is also name of test's parameter.
before "test" is being preprocessed, all occurences of "param" in it's body are replaced by it's value. In your case, line "macro sub_test param" becomes "macro sub_test", and after that it is preprocessed. |
|||
![]() |
|
LocoDelAssembly 16 Jul 2007, 14:46
Quote:
I don't believe that. That means that in some moment "macro sub_test param" becomes "macro sub_test 1" because as you said param gets replaced, however the example prints "05", not "00" nor "01" nor error because using 1 as symbol when you can't. [edit]Ahp, you CAN use a number as formal param ![]() Code: macro test param { macro sub_test 1 \{ display 1+'0' \} sub_test ; Works always sub_test 5 ; Works always } macro test2 param { display "OK, no problem without a param", 13, 10 } test2 ; Works test ; Works, displays "05" |
|||
![]() |
|
vid 16 Jul 2007, 21:37
no problem, i hope problem is solved now
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.