Printing All Names Beginning with "K"

Fastest Way

This endExclKey allows the cursor to start at the first name beginning with "K", proceed through all the "K"' names, and end once it reaches the first name starting with "L" or greater. This example took approximately 1 second to execute, a big saving:

soup := GetUnionSoup("Names");
curs := soup:Query(
   {
      indexPath: 'sortOn, 
      beginKey: "k",
      endExclKey: "l",
   });

e := curs:Entry();
while e do begin
   Print(e.sortOn);
   e := curs:Next();
end;
"Keohane"
"Kohnlenberger"
"Kollmyer"
"Kuang"

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

Last modified: 1 DEC 1996