Handbook
Glossary
?offset-of-slot ( name tuple -- n/f )
Vocabulary
classes
.
tuple
Inputs
name
a
string
tuple
a
tuple
Outputs
n/f
an
integer
or
f
Word description
Returns the offset of a tuple slot accessed by
name
, or
f
if no slot with that name.
Definition
USING:
accessors
classes
kernel
slots
;
IN:
classes.tuple
:
?offset-of-slot
( name tuple -- n/f )
class-of
all-slots
slot-named
[
offset>>
]
[
f
]
if*
;