Handbook
Glossary
struct-definer-word ( class -- word )
Vocabulary
classes
.
struct
.
prettyprint
.
private
Inputs
class
an
object
Outputs
word
an
object
Definition
USING:
accessors
classes.struct
combinators
kernel
math
sequences
;
IN:
classes.struct.prettyprint.private
:
struct-definer-word
( class -- word )
struct-slots
{
{
[
dup
[
packed?>>
]
all?
]
[
drop
\
PACKED-STRUCT:
]
}
{
[
dup
length
1
<=
]
[
drop
\
STRUCT:
]
}
{
[
dup
[
offset>>
0
=
]
all?
]
[
drop
\
UNION-STRUCT:
]
}
[
drop
\
STRUCT:
]
}
cond
;