flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar
In first case it is not possible to have only name and no parameters - because "name params" need to match at least two elements (one for "name" and one for "params"), and if only name is provided, the match will not happen.
In second case the ">" artificially provides something to match the "params" even when there is only name provided. |
|||
![]() |
|
edemko
Thank you.
Macro below was expected to show procedure name. It does not. As i know "match name params" denotes local constants. That's why "display `name" used. But "namename" visible instead of "p1p2". Am i wrong here too? Code: macro proc [args]{ common match name params, args>\{ display `name define@proc name, <params \} } proc p1 endp proc p2 endp |
|||
![]() |
|
Tomasz Grysztar
` operator is processed by the outer macro, so it converts the "name" token into string. To make it processed by the inner macro (the "match" one) you need to escape it with backslash:
Code: display \`name |
|||
![]() |
|
edemko
appreciate that, thanks, final macro:
Code: macro proc [args]{ common match name params, args>\{ if used \name db 0,'proc ',\`name,0 define@proc \name, <\params end if \} } |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.