Next: , Previous: , Up: Structures   [Contents][Index]

5.22.5 Structure Glossary

%align ( align size –  ) gforth-0.4 “%align”

Align the data space pointer to the alignment align.

%alignment ( align size – align  ) gforth-0.4 “%alignment”

The alignment of the structure.

%alloc ( align size – addr  ) gforth-0.4 “%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.4 “%allocate”

Allocate size address units with alignment align, similar to allocate.

%allot ( align size – addr  ) gforth-0.4 “%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.4 “cell%”
char% ( – align size  ) gforth-0.4 “char%”
dfloat% ( – align size  ) gforth-0.4 “dfloat%”
double% ( – align size  ) gforth-0.4 “double%”
end-struct ( align size "name" –  ) gforth-0.4 “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.4 “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: addr1addr2.

float% ( – align size  ) gforth-0.4 “float%”
naligned ( addr1 n – addr2  ) gforth-0.5 “naligned”

addr2 is the aligned version of addr1 with respect to the alignment n.

sfloat% ( – align size  ) gforth-0.4 “sfloat%”
%size ( align size – size  ) gforth-0.4 “%size”

The size of the structure.

struct ( – align size  ) gforth-0.4 “struct”

An empty structure, used to start a structure definition.

Next: Forth200x Structures, Previous: Structure Implementation, Up: Structures   [Contents][Index]