Path: utzoo!attcan!uunet!willett!ForthNet From: ForthNet@willett.UUCP (ForthNet articles from GEnie) Newsgroups: comp.lang.forth Subject: Data Structures Message-ID: <673.UUL1.3#5129@willett.UUCP> Date: 18 Mar 90 00:23:25 GMT Organization: Latest link in the ForthNet chain. (Pgh, PA) Lines: 46 Date: 03-13-90 (09:54) Number: 3035 (Echo) To: ALL Refer#: NONE From: JONAH THOMAS Read: (N/A) Subj: B-TREES Status: PUBLIC MESSAGE Some months ago Dave Weinstein put up a message about using TREE structures, following a concept by Larry Forsley. There was a defining word, TREE , which recursively made each word it defined to also be a defining word which did the same thing TREE did. Each word got tagged with the address of the word which defined it, which created a tree-like hierarchy. Then he defined a set of words which looked at the tags to trace out the 'lineage' of any particular word. It was based on an idea by Larry Forsley. It looked neat, so I saved it. When I needed it, I was a bit disappointed. It's a really nice idea, but it doesn't actually do much. Each word in the tree is a defining word. You use it to define 'branches', the later words in the tree. Each of THEM is ALSO a defining word, which can define new defining words. But none of the words can do anything except define new defining words, so you need to fiddle with them to actually use them for anything. The obvious way to do it is to use a non-recursive defining word, which would then be used something like: 0 subs car car subs ford car subs chevy car subs mercedes ford subs escort chevy subs nova nova subs 1987 Then CHILD could give its pfa, which contains the pfa of PARENT. All nice and neat to use, just an extra word when you define a branch. : SUBS CREATE , ; : .NAMER BODY> >NAME .NAME ; ( For Pygmy, 3 - .ID ) : ANCESTRY BEGIN @ ?DUP WHILE DUP .NAMER REPEAT ; --- * Via ProDoor 3.1 NET/Mail : The MATRIX (5 Nodes/1.2 Gig) Birmingham, AL (205) 323-2016 ----- This message came from GEnie via willett through a semi-automated process. Report problems to: 'uunet!willett!dwp' or 'willett!dwp@gateway.sei.cmu.edu'