Next: Forth200x Structures, Previous: Structure Implementation, Up: Structures [Contents][Index]
%align ( align size – ) gforth-0.6 “%align”
Align the data space pointer to the alignment align.
%alignment ( align size – align ) gforth-0.6 “%alignment”
The alignment of the structure.
%alloc ( align size – addr ) gforth-0.6 “%alloc”
Allocate size address units with alignment align,
giving a data block at addr; throw an ior code
if not successful.
%allocate ( align size – addr ior ) gforth-0.6 “%allocate”
Allocate size address units with alignment align,
similar to allocate.
%allot ( align size – addr ) gforth-0.6 “%allot”
Allot size address units of data space with alignment align; the resulting block of data is found at addr.
cell% ( – align size ) gforth-0.6 “cell%”
char% ( – align size ) gforth-0.6 “char%”
dfloat% ( – align size ) gforth-0.6 “dfloat%”
double% ( – align size ) gforth-0.6 “double%”
end-struct ( align size "name" – ) gforth-0.6 “end-struct”
Define a structure/type descriptor name with alignment
align and size size1 (size rounded up to be a
multiple of align).
name execution: – align size1
field ( align1 offset1 align size "name" – align2 offset2 ) gforth-0.6 “field”
Create a field name with offset offset1, and the type
given by align size. offset2 is the offset of the
next field, and align2 is the alignment of all fields.
name execution: addr1 – addr2.
addr2=addr1+offset1
float% ( – align size ) gforth-0.6 “float%”
sfloat% ( – align size ) gforth-0.6 “sfloat%”
%size ( align size – size ) gforth-0.6 “%size”
The size of the structure.
struct ( – align size ) gforth-0.6 “struct”
An empty structure, used to start a structure definition.
Next: Forth200x Structures, Previous: Structure Implementation, Up: Structures [Contents][Index]