<struct> ( class -- struct )
Factor handbook » C library interface » Struct classes » Creating instances of structs

Next:<struct-boa> ( class -- quot: ( ... -- struct ) )


Vocabulary
classes.struct

Inputs
classa class


Outputs
structa struct


Word description
Allocates garbage-collected heap memory for a new struct of the specified class. The new struct's slots are initialized with the initial values specified in the struct definition.

See also
<struct-boa>, malloc-struct, memory>struct

Definition