UNION-STRUCT: - Factor Documentation (original) (raw)

UNION-STRUCT:
Factor handbook » C library interface » Passing data between Factor and C » C type specifiers

Prev: STRUCT:
Next: CALLBACK:

Vocabulary
classes.struct

Syntax

UNION-STRUCT: class { slot type } { slot type } ... ;

Inputs
None

Outputs
None

Word description
Defines a new struct type where all of the slots share the same storage. See STRUCT: for details on the syntax.

See also
struct, STRUCT:

Definition

USING: classes.struct.private ;

IN: classes.struct

SYNTAX: UNION-STRUCT:
parse-struct-definition define-union-struct-class ;