Handbook
Glossary
define-enum ( word base-type members -- )
Factor handbook
»
C library interface
»
Passing data between Factor and C
»
Enumeration types
Prev:
ENUM:
Next:
enum>number ( enum -- number )
Vocabulary
alien
.
enums
Inputs
word
a
word
base-type
a
c-type
members
sequence of word and value pairs
Outputs
None
Word description
Defines an enum. This is the run-time equivalent of
ENUM:
.
See also
ENUM:
,
enum>number
,
number>enum
Definition
USING:
assocs
kernel
;
IN:
alien.enums
:
define-enum
( word base-type members -- )
[
(define-enum)
]
[
[
define-enum-value
]
assoc-each
]
bi
;