Soups

Searching through Every Entry

Given this structure for indexes, what is the most appropriate method for traversing the soup? The answer, of course, depends on your search criteria. For example, imagine you are using an index to traverse a soup and want to visit a subset of contiguous entries. The simplest approach would be to go through each entry checking to see whether it matches your criteria. On the Newton, this simple approach will result if you use a validTest (see FIGURE 9.4).

FIGURE 9.4 : The entries visited when using only a validTest.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996