(C) 2000 - 2001 Guido Draheim
lisence: GNU LGPL, non-substantial parts may promote to any opensource.org approved license.
description: "struct" implements neon/mops/mpe-like structures. "structs" implements fsl/mforth-like structures.
the two wordsets are designed to let the sub-words to be used interchangably both inside STRUCT and STRUCTURE definitions. They will also work inside pfe's class-definitions btw.
The provided words try to be compatible with the simple implementation guidelines as provided in the survey at the comp.lang.forth.repository (http://forth.sourceforge.net/word/structure) and the documentation on MPE' forth's implementation (/vol/c/Programme/PfwVfx/Doc/VfxMan.Htm/struct.html) and the structs-source of the Forth Scientific Library (lib/fsl/structs.fth)
field-layout PFA[0] has the offset (elsewhere for the method-table) PFA[1] has the sizeof (may serve as minimalistic type-id)
struct-layout PFA[0] unused (elswehere method-table or type-id) PFA[1] has the sizeof (that is instantiated)
therefore SIZEOF is designed to give a nice result in both places.
EXTENSIONS
STRUCTURE:
( .. )(
)
;
as:"structure-colon";
ordinary primitive STRUCTURE:
an executable word (no special usage info)
or wrapper call around p4_structure
EXTENSIONS
;STRUCTURE
( .. )( | ) ; |
; |
ordinary primitive ;STRUCTURE
an executable word (no special usage info)
or wrapper call around p4_endstructure
EXTENSIONS
CHAR:
( .. )(
)
;
as:"char-colon";
ordinary primitive CHAR:
an executable word (no special usage info)
or wrapper call around p4_char_colon
EXTENSIONS
WCHAR:
( .. )(
)
;
as:"wchar-colon";
ordinary primitive WCHAR:
an executable word (no special usage info)
or wrapper call around p4_wchar_colon
EXTENSIONS
CELL:
( .. )(
)
;
as:"cell-colon";
ordinary primitive CELL:
an executable word (no special usage info)
or wrapper call around p4_cell_colon
EXTENSIONS
DOUBLE:
( .. )(
)
;
as:"double-colon";
ordinary primitive DOUBLE:
an executable word (no special usage info)
or wrapper call around p4_two_cell_colon
EXTENSIONS
FLOAT:
( .. )(
)
;
as:"float-colon";
ordinary primitive FLOAT:
an executable word (no special usage info)
or wrapper call around p4_float_colon
EXTENSIONS
CHARS:
( .. )(
)
;
as:"chars-colon";
ordinary primitive CHARS:
an executable word (no special usage info)
or wrapper call around p4_chars_colon
EXTENSIONS
WCHARS:
( .. )(
)
;
as:"wchars-colon";
ordinary primitive WCHARS:
an executable word (no special usage info)
or wrapper call around p4_wchars_colon
EXTENSIONS
CELLS:
( .. )(
)
;
as:"cells-colon";
ordinary primitive CELLS:
an executable word (no special usage info)
or wrapper call around p4_cells_colon
EXTENSIONS
INTEGER:
( .. )(
)
;
as:"integer-colon";
ordinary primitive INTEGER:
an executable word (no special usage info)
or wrapper call around p4_cell_colon
EXTENSIONS
POINTER:
( .. )(
)
;
as:"pointer-colon";
ordinary primitive POINTER:
an executable word (no special usage info)
or wrapper call around p4_cell_colon
EXTENSIONS
STRUCT:
( .. )(
)
;
as:"struct-colon";
ordinary primitive STRUCT:
an executable word (no special usage info)
or wrapper call around p4_field
EXTENSIONS
ARRAY:
( .. )(
)
;
as:"array-colon";
ordinary primitive ARRAY:
an executable word (no special usage info)
or wrapper call around p4_array_of