7 pool pool = global_pool;
8 sash h = new_sash (pool);
12 sash_insert (h, "banana", "yellow");
13 sash_insert (h, "orange", "orange");
14 sash_insert (h, "apple", "red");
15 sash_insert (h, "kiwi", "green");
16 sash_insert (h, "grapefruit", "yellow");
17 sash_insert (h, "pear", "green");
18 sash_insert (h, "tomato", "red");
19 sash_insert (h, "tangerine", "orange");
23 printf ("Please type in the name of a fruit: ");
24 fruit = pgetline (pool, stdin, 0);
26 if (sash_get (h, fruit, color))
27 printf ("The color of that fruit is %s.\n", color);
29 printf ("Sorry, I don't know anything about that fruit.\n");