home *** CD-ROM | disk | FTP | other *** search
/ The Princeton Review - Science Smart / SCIENCE.iso / pc / science / files / cad.dir / 00089.ls < prev    next >
Encoding:
Text File  |  1996-01-26  |  2.0 KB  |  83 lines

  1. on hfile2
  2.   global gReadObject
  3.   set stime to the ticks
  4.   set the itemDelimiter to ","
  5.   clearlup()
  6.   set lup1 to EMPTY
  7.   set lup2 to EMPTY
  8.   set lup3 to EMPTY
  9.   set lup4 to EMPTY
  10.   set lup5 to EMPTY
  11.   set lup6 to EMPTY
  12.   set lup7 to EMPTY
  13.   set lup8 to EMPTY
  14.   set lup9 to EMPTY
  15.   set lup10 to EMPTY
  16.   set lup11 to EMPTY
  17.   set lup12 to EMPTY
  18.   set lup13 to EMPTY
  19.   set lup14 to EMPTY
  20.   set lup15 to EMPTY
  21.   set lup16 to EMPTY
  22.   set lup17 to EMPTY
  23.   set lup18 to EMPTY
  24.   set lup19 to EMPTY
  25.   set lup20 to EMPTY
  26.   set gReadObject to FileIO(mnew, "read", the pathName & "inout2.txt")
  27.   repeat with index = 1 to 6469
  28.     if (index mod 100) = 1 then
  29.       put index
  30.     end if
  31.     set cname to gReadObject(mReadLine)
  32.     set lword to item 1 of cname
  33.     set tp to shash(lword)
  34.     set lname to "lup" & item 1 of tp
  35.     set rx to item 1 of tp
  36.     put "!" after line 1 of cname
  37.     set exres to " put line 1 of cname after line (value (item 2 of tp)) of lup" & rx
  38.     do(exres)
  39.   end repeat
  40.   put lup1 into field "lup1"
  41.   put lup2 into field "lup2"
  42.   put lup3 into field "lup3"
  43.   put lup4 into field "lup4"
  44.   put lup5 into field "lup5"
  45.   put lup6 into field "lup6"
  46.   put lup7 into field "lup7"
  47.   put lup8 into field "lup8"
  48.   put lup9 into field "lup9"
  49.   put lup10 into field "lup10"
  50.   put lup11 into field "lup11"
  51.   put lup12 into field "lup12"
  52.   put lup13 into field "lup13"
  53.   put lup14 into field "lup14"
  54.   put lup15 into field "lup15"
  55.   put lup16 into field "lup16"
  56.   put lup17 into field "lup17"
  57.   put lup18 into field "lup18"
  58.   put lup19 into field "lup19"
  59.   put lup20 into field "lup20"
  60.   gReadObject(mdispose)
  61.   put (the ticks - stime) / 3600
  62. end
  63.  
  64. on clearlup
  65.   repeat with index = 1 to 20
  66.     set nm to "lup" & index
  67.     put EMPTY into field nm
  68.   end repeat
  69.   beep(1)
  70. end
  71.  
  72. on writefile
  73.   global gWriteobject
  74.   set gWriteobject to FileIO(mnew, "write", the pathName & "index3.txt")
  75.   repeat with index = 106 to 946
  76.     set thetext to the text of cast index
  77.     gWriteobject(mWriteString, thetext)
  78.     gWriteobject(mWriteString, "@")
  79.   end repeat
  80.   gWriteobject(mdispose)
  81.   beep()
  82. end
  83.