flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > CREATE_ID simple macro to create identif-s |
Author |
|
LocoDelAssembly 05 Aug 2007, 21:03
I was using this one for a while to uniquely identify resources
Code: macro UID id* { if ~defined UID | ~UID UID = 0 end if UID = UID+1 id = UID } So, each time I call UID I get a new ID. Your macro is still good, since it behaves like enum of C and can be used for the same purposes. Thanks for sharing! |
|||
05 Aug 2007, 21:03 |
|
Blid 08 Aug 2007, 07:41
Code: your macro + my macro CREATE_ID [id] { common if ~defined UID | ~UID UID = 0 end if forward UID = UID + 1 id = UID common } ;CREATE_ID id_1,id_2 |
|||
08 Aug 2007, 07:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.