include lib/ncoding.4th
( define the structure )
struct
64 +field name
nell +field quantity
end-struct /product
( define number of products)
500 constant #product
( define an array of structs)
#product /product * buffer: products does> swap /product * + ;
( now enter the values)
s" nuts" 0 product -> name place
500 0 product -> quantity n!
s" vegetable oil" 1 product -> name place
20 1 product -> quantity n!
Hans Bezemer