Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1. set date Italian
  2. set softseek on
  3. use GROUP new
  4. index on Ngr to GROUP
  5. use STUD new
  6. set relation to Ngr into GROUP
  7. set softseek on
  8.  
  9. ?"----------1-----------"
  10. index on fio to fio.ntx
  11. do while(!eof())
  12. ? fio, Ngr, GROUP->spec
  13. skip
  14. enddo
  15. ?
  16.  
  17. ?"----------2-----------"
  18. index on fio to fio.ntx
  19. testNgr = Ngr
  20. ?Ngr
  21. ?" ",fio,GROUP->spec
  22. skip
  23. do while(!eof())
  24. if testNgr # Ngr
  25. ?
  26. ?Ngr
  27. endif
  28. testNgr = Ngr
  29. ?" ",fio,GROUP->spec
  30. skip
  31. enddo
  32. ?
  33.  
  34. ?"----------3-----------"
  35.  
  36. index on str(Ngr)+fio to fio.ntx
  37. testNgr = Ngr
  38. testSpec = GROUP->spec
  39. ?Ngr," ",GROUP->spec
  40. skip
  41. do while(!eof())
  42. if testNgr # Ngr
  43. ?Ngr," ",GROUP->spec
  44. elseif testSpec # GROUP->spec
  45. ?Ngr," ",GROUP->spec
  46. endif
  47. ?" ",fio
  48. skip
  49. enddo
  50. ?
  51.  
  52. ?"----------4-----------"
  53. index on str(GROUP->spec)+fio to fio.ntx
  54. testNgr = Ngr
  55. testSpec = GROUP->spec
  56. ?GROUP->spec," ",Ngr
  57. do while(!eof())
  58. if testSpec # GROUP->spec
  59. ?GROUP->spec," ",Ngr
  60. elseif testNgr # Ngr
  61. ?GROUP->spec," ",Ngr
  62. endif
  63.  
  64. testNgr = Ngr
  65. testSpec = GROUP->spec
  66. ?" ",fio
  67. skip
  68. enddo
  69. ?
  70.  
  71. ?"----------5-----------"
  72. index on str(GROUP->spec)+str(Ngr)+fio to fio.ntx
  73. testSpec = GROUP->spec
  74. testNgr = Ngr
  75. ?GROUP->spec," ",Ngr," ",fio
  76. skip
  77. do while(!eof())
  78. if testSpec # GROUP->spec
  79. ?
  80. ?GROUP->spec
  81. endif
  82. if testNgr # Ngr
  83. ?
  84. ?" ",Ngr
  85. endif
  86. testSpec = GROUP->spec
  87. testNgr = Ngr
  88. ?" ",fio
  89. skip
  90.  
  91. enddo
  92. ?
  93.  
  94. ?"----------6-----------"
  95. index on str(GROUP->spec)+fio to fio.ntx
  96. testSpec = GROUP->spec
  97. ?GROUP->spec," ",fio,Ngr
  98. skip
  99. do while(!eof())
  100. if testSpec # GROUP->spec
  101. ?GROUP->spec
  102. endif
  103. testSpec = GROUP->spec
  104. ?" ",fio,Ngr
  105. skip
  106. enddo
  107. ?
  108. _________________________________________________________________________________________________________________
  109. set date Italian
  110.  
  111. st={{'fio','C',15,0},{'sex','L',1,0},{'dr','D',8,0},{'stip','N',8,2},{'Ngr','N',1,0}}
  112. dbcreate('STUD',st)
  113. use STUD new
  114.  
  115. append blank
  116. repl fio with "Ivanov"
  117. repl sex with .t.
  118. repl dr with CtoD("20-5-1950")
  119. repl stip with 160.13
  120. repl Ngr with 1
  121.  
  122. append blank
  123. repl fio with "Sanya"
  124. repl sex with .f.
  125. repl dr with CtoD("9-1-1986")
  126. repl stip with 1500.1
  127. repl Ngr with 1
  128.  
  129. append blank
  130. repl fio with "Alexandra"
  131. repl sex with .t.
  132. repl dr with CtoD("14-6-1998")
  133. repl stip with 100.0
  134. repl Ngr with 1
  135.  
  136. append blank
  137. repl fio with "Plebs"
  138. repl sex with .t.
  139. repl dr with CtoD("14-6-1998")
  140. repl stip with 100.0
  141. repl Ngr with 2
  142.  
  143. append blank
  144. repl fio with "Vanya"
  145. repl sex with .t.
  146. repl dr with CtoD("14-2-1997")
  147. repl stip with 100.0
  148. repl Ngr with 2
  149.  
  150. append blank
  151. repl fio with "Tripoloski"
  152. repl sex with .t.
  153. repl dr with CtoD("13-6-1998")
  154. repl stip with 100.0120
  155. repl Ngr with 3
  156.  
  157. append blank
  158. repl fio with "Dada"
  159. repl sex with .f.
  160. repl dr with CtoD("12-6-1990")
  161. repl stip with 1300.0
  162. repl Ngr with 3
  163.  
  164. append blank
  165. repl fio with "Pupu"
  166. repl sex with .f.
  167. repl dr with CtoD("12-10-1990")
  168. repl stip with 1300.0
  169. repl Ngr with 3
  170.  
  171.  
  172.  
  173. gp={{'Ngr','N',1,0},{'spec','N',1,0}}
  174. dbcreate('GROUP',gp)
  175. use GROUP new
  176. SELECT GROUP
  177.  
  178. append blank
  179. repl Ngr with 1
  180. repl spec with 1
  181.  
  182. append blank
  183. repl Ngr with 2
  184. repl spec with 1
  185.  
  186. append blank
  187. repl Ngr with 3
  188. repl spec with 2
  189.  
  190.  
  191.  
  192.  
  193. SELECT STUD
  194. ?fio, sex, dr, stip, Ngr, GROUP -> spec
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement