home *** CD-ROM | disk | FTP | other *** search
/ MacPeople 2001 June 15 / MACPEOPLE-2001-06-15.ISO.7z / MACPEOPLE-2001-06-15.ISO / オンラインウエア / 新着!オンラインウエア16 / KHyX.sit / KHyX / Modules / HMConversions / stack.txt < prev   
Text File  |  2001-03-08  |  8KB  |  184 lines

  1. -- stack: in
  2. -- format: 10 (HyperCard 2)
  3. -- flags: 0x1000 (none)
  4. -- protect password hash: 0
  5. -- maximum user level: 5 (scripting)
  6. -- window: Rect(x1=0, y1=0, x2=0, y2=0)
  7. -- screen: Rect(x1=0, y1=0, x2=0, y2=0)
  8. -- card dimensions: w=416 h=240
  9. -- scroll: x=0 y=0
  10. -- background count: 1
  11. -- first background id: 2728
  12. -- card count: 1
  13. -- first card id: 3676
  14. -- list block id: 2215
  15. -- print block id: 0
  16. -- font table block id: 3529
  17. -- style table block id: 3151
  18. -- free block count: 4
  19. -- free size: 5216 bytes
  20. -- total size: 16384 bytes
  21. -- stack block size: 7168 bytes
  22. -- created by hypercard version: 0x02418000
  23. -- compacted by hypercard version: 0x02418000
  24. -- modified by hypercard version: 0x02418000
  25. -- opened by hypercard version: 0x02418000
  26. -- patterns[0]: 0x0000000000000000
  27. -- patterns[1]: 0x8000000008000000
  28. -- patterns[2]: 0x8800220088002200
  29. -- patterns[3]: 0x8888222288882222
  30. -- patterns[4]: 0x88AA22AA88AA22AA
  31. -- patterns[5]: 0xCCAA33AACCAA33AA
  32. -- patterns[6]: 0xEEAABBAAEEAABBAA
  33. -- patterns[7]: 0xEEBBBBEEEEBBBBEE
  34. -- patterns[8]: 0xFFBBFFEEFFBBFFEE
  35. -- patterns[9]: 0xFFBBFFFFFFBBFFFF
  36. -- patterns[10]: 0x8010022001084004
  37. -- patterns[11]: 0xFFFFFFFFFFFFFFFF
  38. -- patterns[12]: 0x8822882288228822
  39. -- patterns[13]: 0x1122448811224488
  40. -- patterns[14]: 0xC4800C6843023026
  41. -- patterns[15]: 0xB130031BD8C00C8D
  42. -- patterns[16]: 0xAA00AA00AA00AA00
  43. -- patterns[17]: 0x8822552288225522
  44. -- patterns[18]: 0x8855225588552255
  45. -- patterns[19]: 0x77DD77DD77DD77DD
  46. -- patterns[20]: 0x8000000000000000
  47. -- patterns[21]: 0xAA55AA55AA55AA55
  48. -- patterns[22]: 0x038448300C020101
  49. -- patterns[23]: 0x8244394482010101
  50. -- patterns[24]: 0x8814224188412214
  51. -- patterns[25]: 0x8080413E080814E3
  52. -- patterns[26]: 0x22048C7422179810
  53. -- patterns[27]: 0xBE808808EB088880
  54. -- patterns[28]: 0x25C8328964244C92
  55. -- patterns[29]: 0xA29C41BE2AC914EB
  56. -- patterns[30]: 0x40A00000040A0000
  57. -- patterns[31]: 0x8040200002040800
  58. -- patterns[32]: 0xAA00800088008000
  59. -- patterns[33]: 0xFF80808080808080
  60. -- patterns[34]: 0x081C22C180010204
  61. -- patterns[35]: 0xFF808080FF080808
  62. -- patterns[36]: 0xF87422478F172271
  63. -- patterns[37]: 0xBF00BFBFB0B0B0B0
  64. -- patterns[38]: 0xFF7FBE5DA2418000
  65. -- patterns[39]: 0xFAF5FAF5A050A050
  66. -- checksum: 0xE153BE1D
  67. ----- HyperTalk script -----
  68. function angleconvert n,s,d
  69. if the first char of s = "d" then put 360 into s -- degrees
  70. if the first char of s = "r" then put 2*pi into s -- radians
  71. if the first char of s = "g" then put 400 into s -- gradians
  72. if the first char of s = "u" then put 1 into s -- units
  73. if the first char of s = "b" then put 256 into s -- binary
  74. if the first char of s = "a" then put 64 into s -- applesoft basic
  75. if the first char of d = "d" then put 360 into d
  76. if the first char of d = "r" then put 2*pi into d
  77. if the first char of d = "g" then put 400 into d
  78. if the first char of d = "u" then put 1 into d
  79. if the first char of d = "b" then put 256 into d
  80. if the first char of d = "a" then put 64 into d
  81. if d is empty then put 2*pi into d
  82. if s is empty then put 360 into s
  83. if n is empty then put 0 into n
  84. return n*(d/s)
  85. end angleconvert
  86.  
  87. function tempconvert n,s,d
  88. put the first char of s into e
  89. if the first char of s = "r" then put the second char of s after e
  90. put the first char of d after e
  91. if the first char of d = "r" then put the second char of d after e
  92. if e = "fc" then return (n-32)/1.8
  93. if e = "cf" then return (n*1.8)+32
  94. if e = "fk" then return (n+459.67)/1.8
  95. if e = "ck" then return n+273.16
  96. if e = "kf" then return (n*1.8)-459.67
  97. if e = "kc" then return n-273.16
  98. if e = "rek" then return (n*1.25)+273.16
  99. if e = "rak" then return n/1.8
  100. if e = "kra" then return n*1.8
  101. if e = "kre" then return (n-273.16)/1.25
  102. if e = "ref" then return (((n*1.25)+273.16)*1.8)-459.67
  103. if e = "fre" then return (((n+459.67)/1.8)-273.16)/*1.25
  104. if e = "rec" then return n*1.25
  105. if e = "cre" then return n/1.25
  106. if e = "fra" then return n+459.67
  107. if e = "cra" then return (n+273.16)*1.8
  108. if e = "raf" then return n-459.67
  109. if e = "rac" then return (n/1.8)-273.16
  110. if e = "rare" then return ((n/1.8)-273.16)/1.25
  111. if e = "rera" then return ((n*1.25)+273.16)*1.8
  112. if e is in "/rara/rere/ff/cc/kk/" then return n
  113. end tempconvert
  114.  
  115. function lengthconvert n,s,d
  116. if s = "meters" or s = "m" then put 39.13 into s
  117. if s = "millimeters" or s = "mm" then put 0.3125 into s
  118. if s = "centimeters" or s = "cm" then put 0.3937008 into s
  119. if s = "rods" or s = "r" then put 198 into s
  120. if s = "feet" or s = "ft" or s = "'" then put 12 into s
  121. if s = "miles" or s = "mi" then put 63360 into s
  122. if s = "inches" or s = "in" or s = "''" or s = quote then put 1 into s
  123. if s = "yards" or s = "yd" or s = "y" then put 36 into s
  124. if d = "meters" or d = "m" then put 39.13 into d
  125. if d = "millimeters" or d = "mm" then put 0.3125 into d
  126. if d = "centimeters" or d = "cm" then put 0.3937008 into d
  127. if d = "rods" or d = "r" then put 198 into d
  128. if d = "feet" or d = "ft" or d = "'" then put 12 into d
  129. if d = "miles" or d = "mi" then put 63360 into d
  130. if d = "inches" or d = "in" or d = "''" or d = quote then put 1 into d
  131. if d = "yards" or d = "yd" or d = "y" then put 36 into d
  132. return n*(d/s)
  133. end lengthconvert
  134.  
  135. function areaconvert n,s,d
  136. if char 1 of s = "f" or char 1 of word 2 of s = "f" then put 144 into s
  137. if char 1 of s = "i" or char 1 of word 2 of s = "i" then put 1 into s
  138. if char 1 of s = "a" or char 1 of word 2 of s = "a" then put 6324480 into s
  139. if char 1 of s = "m" or char 1 of word 2 of s = "m" then put 4047667200 into s
  140. if char 1 of s = "y" or char 1 of word 2 of s = "y" then put 1296 into s
  141. if char 1 of s = "r" or char 1 of word 2 of s = "r" then put 39528 into s
  142. if char 1 of d = "f" or char 1 of word 2 of d = "f" then put 144 into d
  143. if char 1 of d = "i" or char 1 of word 2 of d = "i" then put 1 into d
  144. if char 1 of d = "a" or char 1 of word 2 of d = "a" then put 6324480 into d
  145. if char 1 of d = "m" or char 1 of word 2 of d = "m" then put 4047667200 into d
  146. if char 1 of d = "y" or char 1 of word 2 of d = "y" then put 1296 into d
  147. if char 1 of d = "r" or char 1 of word 2 of d = "r" then put 39528 into d
  148. return n*(d/s)
  149. end areaconvert
  150.  
  151. function volumeconvert n,s,d
  152. if char 1 of s = "f" or char 1 of word 2 of s = "f" then put 1728 into s
  153. if char 1 of s = "i" or char 1 of word 2 of s = "i" then put 1 into s
  154. if char 1 of s = "y" or char 1 of word 2 of s = "y" then put 46656 into s
  155. if char 1 of s = "c" or char 1 of word 2 of s = "c" then put 221184 into s
  156. if char 1 of d = "f" or char 1 of word 2 of d = "f" then put 1728 into d
  157. if char 1 of d = "i" or char 1 of word 2 of d = "i" then put 1 into d
  158. if char 1 of d = "y" or char 1 of word 2 of d = "y" then put 46656 into d
  159. if char 1 of d = "c" or char 1 of word 2 of d = "c" then put 221184 into d
  160. return n*(d/s)
  161. end volumeconvert
  162.  
  163. function bytesizeconvert n,s,d
  164. if char 1 of s = "b" and char 2 of s = "i" then put 0.125 into s -- bits
  165. if char 1 of s = "n" then put 0.5 into s -- nybbles
  166. if char 1 of s = "b" and char 2 of s = "y" then put 1 into s -- bytes
  167. if char 1 of s = "b" then put 1 into s -- bytes
  168. if char 1 of s = "w" then put 2 into s -- words
  169. if char 1 of s = "l" then put 4 into s -- longs
  170. if char 1 of s = "k" then put 1024 into s -- kilobytes
  171. if char 1 of s = "m" then put 1048576 into s -- megabytes
  172. if char 1 of s = "g" then put 1073741824 into s -- gigabytes
  173. if char 1 of d = "b" and char 2 of d = "i" then put 0.125 into d
  174. if char 1 of d = "n" then put 0.5 into d
  175. if char 1 of d = "b" and char 2 of d = "y" then put 1 into d
  176. if char 1 of d = "b" then put 1 into d
  177. if char 1 of d = "w" then put 2 into d
  178. if char 1 of d = "l" then put 4 into d
  179. if char 1 of d = "k" then put 1024 into d
  180. if char 1 of d = "m" then put 1048576 into d
  181. if char 1 of d = "g" then put 1073741824 into d
  182. return n*(d/s)
  183. end bytesizeconvert
  184.