flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 06 Dec 2010, 14:03
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 18 Dec 2010, 18:25
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 18 Dec 2010, 18:54
` 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 19 Dec 2010, 07:33
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.