Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!emory!mephisto!psuvax1!psuvm!sas102 From: SAS102@psuvm.psu.edu (Steven A. Schrader) Newsgroups: comp.sys.mac.apps Subject: Re: How do so many words fit in a dictionary/thesaurus? Message-ID: <90257.141912SAS102@psuvm.psu.edu> Date: 14 Sep 90 18:19:12 GMT References: <3374@stl.stc.co.uk> <29477@netnews.upenn.edu> Organization: Penn State University Lines: 20 Actually alot of the dictionaries do not store "words" they use arrays of point ers. In case you do not know a pointer is a variable that points to the location of the data. Now you can point to an array, so what they do is have a pointer pointing to an array of the 26 characters (a-z) ( I am only using lower case for simplicity). This array in turn has pointers to each of the letters. This keeps going and going. Basically the word Apple will be stored as pointer-A-Pointer-P-pointer-p-pointer-l-pointer-e. This takes up about 5 bytes (I think). Adding one more pointer (i.e. Pointer-s) adds Apples to the diction- ary and this will take 6 bytes for two words. If you look for Appler you might find that the last E array does not have a pointer-r attachment and therefore the word is spelled wrong. The computer will suggest the closet, Apples (no doubt) as well as Apple. Does this makes sense? It is hard to explain quickly ---------------------------------------------------------------------- Steven A. Schrader (SAS102 @ Psuvm.Bitnet) Student Consultant Coordinater Student Support Initiative, The Center for Academic Computing The Pennsylvania State University