\ struct 99.1.11 NAB

needs toolkit

0 constant struct

: field ( n "fieldname" -- )
  over create ,  +
  does> ( o -- o+n)  @ + ;

: end-struct ( s "structname" --)
  create ,
  does> ( "name" --)  @ create 0allot ;

: sizeof ( "structname" -- s)
  ' >body @ ;
