home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_01 / 2n01048b < prev    next >
Text File  |  1990-11-14  |  255b  |  19 lines

  1.  
  2.  
  3.  
  4. function search(var s : string) : integer;
  5.     var
  6.         i : integer;
  7.         found : boolean;
  8.     begin
  9.     found := false;
  10.     i := MAX;
  11.     while (i > 0) and (not found) do
  12.         if s = table[i] then
  13.             found := true
  14.         else
  15.             i := i - 1;
  16.     search := i;
  17.     end;
  18.  
  19.