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

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


Inputs and outputs
classa class
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