home *** CD-ROM | disk | FTP | other *** search
/ The Princeton Review - Science Smart / SCIENCE.iso / mac / files / CAD.DiR / 00089.ls < prev    next >
Encoding:
Text File  |  1995-12-08  |  2.0 KB  |  82 lines

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