flat assembler
Message board for the users of flat assembler.
  
|  Index
      > Macroinstructions > What about optional arguments for macros ?? | 
| Author | 
 | 
| mike.dld 26 Jan 2004, 06:46 you can use
 Code: if arg eq ... end if to determine if some argument passed to macros or not and optional arguments must be at the end of arguments list | |||
|  26 Jan 2004, 06:46 | 
 | 
| Tommy 26 Jan 2004, 08:52 Here's an example:     Code: macro optional_args name,value { name: if value eq db ? else db value end if } optional_args test1 ; => test1: db ? optional_args test2,15 ; => test2: db 15 optional_args test3 ; => test3: db ?  | |||
|  26 Jan 2004, 08:52 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.