flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Splitting list of symbols |
Author |
|
Tomasz Grysztar 02 Aug 2005, 14:04
The "irps" directive allows to do the same thing much simpler, without recursion:
Code: macro split macroname*,separator*,items { local list,continue list equ irps sym, items \{ match separator,sym \\{ list equ list>,< continue equ \\} match =continue s, continue sym \\{ list equ list s continue equ \\} restore continue \} match params, <list> \{ macroname params \} } Note that this macro is better from the above one, as it encloses each parameter to macro within < and > characters, so splitted parts may contain commas. On the other hand it doesn't support an empty separator - but splitting to single symbols can be done with the "irps" directive directly. |
|||
02 Aug 2005, 14:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.