home *** CD-ROM | disk | FTP | other *** search
/ Hope PC Multimedia SuperPack 2 / HOMEPC.iso / TAROT / DOWNLOAD / VT3.ZIP / C1.DXR / 00217.ls < prev    next >
Encoding:
Text File  |  1995-11-02  |  775 b   |  30 lines

  1. on insertKey NewKey
  2.   global UsrDivKeys, UsrDivKeyCount
  3.   if NewKey = EMPTY then
  4.     return 
  5.   end if
  6.   if UsrDivKeyCount = 0 then
  7.     set UsrDivKeys to NewKey & ","
  8.     set UsrDivKeyCount to UsrDivKeyCount + 1
  9.     return 
  10.   end if
  11.   if NewKey < item 1 of UsrDivKeys then
  12.     put NewKey & "," before item 1 of UsrDivKeys
  13.     set UsrDivKeyCount to UsrDivKeyCount + 1
  14.     return 
  15.   end if
  16.   repeat with i = 1 to UsrDivKeyCount
  17.     if item i of UsrDivKeys = NewKey then
  18.       return 
  19.       next repeat
  20.     end if
  21.     if NewKey < item i of UsrDivKeys then
  22.       put NewKey & "," before item i of UsrDivKeys
  23.       set UsrDivKeyCount to UsrDivKeyCount + 1
  24.       return 
  25.     end if
  26.   end repeat
  27.   put NewKey after item i of UsrDivKeys
  28.   set UsrDivKeyCount to UsrDivKeyCount + 1
  29. end
  30.