S{
Factor handbook > C library interface > Struct classes > Creating instances of structs

Prev:(malloc-struct) ( class -- struct )


Vocabulary
classes.struct

Syntax
S{ class slots... }


Inputs and outputs
classa struct class word
slotsslot values


Word description
Marks the beginning of a literal struct. The syntax is identical to tuple literal syntax with T{ }; either the assoc syntax (that is, S{ class { slot value } { slot value } ... }) or the simple syntax (S{ class f value value ... }) can be used.

See also
S@

Definition