macro ENUM? name
local enumitems
enumitems equ
macro end?.enum?!
purge ?, end?.enum?
end macro
macro ?! line&
match =end? =enum?, line
match items, enumitems
label name
irp item, items
.#item := % -1
end irp
end match
line
else
enumitems equ enumitems line
end match
end macro
end macro
Usage example:
Code:
enum COLORS
Black, Blue, Green,\
Aqua, Red,
Purple,
Yellow,
White
end enum
db COLORS.White
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum