Handbook
Glossary
set-slot-named ( value name tuple -- )
Vocabulary
classes
.
tuple
Inputs
value
an
object
name
a
string
tuple
a
tuple
Outputs
None
Word description
Stores the
value
into a tuple slot accessed by
name
.
Errors
Throws a
no-slot
error if no slot with that name.
Definition
USING:
accessors
classes
kernel
slots
slots.private
;
IN:
classes.tuple
:
set-slot-named
( value name tuple -- )
[
nip
]
[
2dup
class-of
all-slots
slot-named
[
2nip
pick
over
check-slot-value
offset>>
]
[
no-slot
]
if*
]
2bi
set-slot
;