Handbook
Glossary
Struct classes
Factor handbook
ยป
C library interface
Prev:
Passing data between Factor and C
Next:
Accessing C global variables
The
classes
.
struct
vocabulary implements
struct
classes. They are similar to
tuple
classes, but their slots exhibit value semantics, and they are backed by a contiguous structured block of memory. Structs can be used for space-efficient storage of data in the Factor heap, as well as for passing data to and from C libraries using the
C library interface
.
Struct class examples
Defining struct classes
Creating instances of structs
Passing structs to C functions