home *** CD-ROM | disk | FTP | other *** search
/ Software One-Stop 3 / BOOTCDROM.iso / install / uctab30 / exam.prg < prev    next >
Encoding:
Text File  |  1996-09-25  |  16.8 KB  |  767 lines

  1.  
  2. *********************************************************
  3. * ▒╛│╠╨≥╣ª─▄:                                           *
  4. *     ╩╡╧╓╩²╛▌┐Γ╡─╥╗╢╘╢α─ú╨═╡─╧╘╩╛║═┤≥╙í                *
  5. *                                                       *
  6. *╚δ┐┌:                                                  *
  7. *    FORM ╬¬UCTAB 2.0 ▓·╔·╡──ú░σ╩²╛▌┐Γ               *
  8. *    MASRTERDB ╩╟╓≈╩²╛▌┐Γ,╘┌▒φ╓╨╧╘╩╛╥╗╠⌡╝╟┬╝         *
  9. *    SLAVEDB ╩╟┤╙╩²╛▌┐Γ,╘┌▒φ╓╨╧╘╩╛╢α╠⌡╝╟┬╝           *
  10. *                            *
  11. *╘╝╢¿:  ┤╙╩²╛▌┐Γ▒╪╨δ╙╨╥╗╫╓╢╬├√║═╓≈╩²╛▌┐Γ╡─╥╗╫╓╢╬├√╧α═¼  *
  12. *    ╟╥▒╪╨δ╢╝╖┼╘┌╡┌╥╗╡─╬╗╓├╔╧.                       *
  13. *╙├╖¿:                                                  *
  14. *       STEP 1 : ╙├F2╝ⁿ╢¿╥σ┤╙┐Γ╩╫╨╨                     *
  15. *       STEP 2 : ╙├F3╝ⁿ╢¿╥σ┤╙┐Γ╬▓╨╨                     *
  16. *       STEP 3 : ╙├F4╝ⁿ╢¿╥σ╓≈┐Γ┴┤╜╙                     *
  17. *       STEP 3 : ╙├F5╝ⁿ╢¿╥σ┤╙┐Γ┴┤╜╙,▒╪╨δ╘┌╩╫╨╨╢¿╥σ      *
  18. *    1995─Ω12╘┬27╚╒ ═⌡┤║▓¿╓╞                     *
  19. *********************************************************
  20.  
  21. PARA FORM,MASTERDB,SLAVEDB
  22.  
  23. set talk off
  24. set stat off
  25. set scor off
  26. set safe off
  27.  
  28. load TAB.bin
  29.  
  30. use &MASTERDB
  31. copy to MASTER STRU EXTE
  32.  
  33. use &SLAVEDB
  34. copy to SLAVE STRU EXTE
  35. PUBLIC MAINNO
  36. *------------------------╓≈┐Γ╡─╝╟┬╝║┼--------
  37. MAINNO=1
  38. *--------------------------------------------
  39. PUBLIC SY
  40. PUBLIC TY
  41. set Proc To EXAM
  42. call TAB with chr(14)+' '
  43. call TAB with chr(22)+' 0 1'
  44. call TAB with chr(15) +' '+"0 0"
  45. LogicX=0
  46. LogicY=0
  47. CurX=320
  48. CurY=225
  49. *┤░┐┌
  50. lLimit=5
  51. rLimit=633
  52. uLimit=50
  53. dLimit=445
  54.  
  55. use &FORM
  56. go top
  57. TabXS=TXS
  58. TabYS=TYS
  59. TabXE=TXE
  60. TabYE=TYE
  61. PAGE=twoNum
  62. RecNo=PAGE
  63. index on Y0 to p
  64. isKey=1
  65. go top
  66. do Cursor with CurX,CurY
  67. do while .t.
  68. if isKey = 1
  69. *╧╘╩╛
  70. do readLib
  71. do DispTab
  72. do Cursor with CurX,CurY
  73. endif
  74. isKey = 0
  75. key = inkey(0)
  76. call Tab with chr(26)
  77. step=24
  78. do case
  79.     case key = 27
  80.     close all
  81.     exit
  82.     case key = -1
  83.     do SHead
  84.     isKey = 1
  85.     case key = -2
  86.     do STail
  87.     isKey = 1
  88.     case key = -3
  89.     do MainLink
  90.     isKey = 1
  91.     case key = -4
  92.     do slaveLink
  93.     isKey = 1
  94.     case key = -5
  95.     do ClearLink
  96.     isKey = 1
  97.     case key = -6
  98.     DO PRINTTAB
  99.     case key = -7
  100.          *╓≈╩²╛▌┐Γ╡─╝╟┬╝║┼
  101.      MAINNO=MAINNO+1
  102.      isKey = 1
  103.     case key = -8
  104.     isKey = 0
  105.      MAINNO=MAINNO-1
  106.     isKey = 1
  107.     case key = 13
  108.     if ( LocateCel(CurX+LogicX-8,CurY+LogicY-50) <> 0 )
  109.     NO=LocateCel(CurX+LogicX-8,CurY+LogicY-50)
  110.     @18,5 say "╩Σ╚δ╡Ñ╘¬╓╡:" get value
  111.     read
  112.     ENDI
  113.     isKey = 1
  114.     case key = 1
  115.     isKey = 1
  116.     if LogicX = 0 .and. LogicY = 0
  117.        isKey = 0
  118.     endi
  119.     LogicX = 0
  120.     LogicY = 0
  121.     do Cursor with CurX,CurY
  122.        CurX = 320
  123.        CurY = 225
  124.     do Cursor with CurX,CurY
  125.     case key=24
  126.     do Cursor with CurX,CurY
  127.     CurY = CurY + step
  128.     if ( CurY > dLimit )
  129.         LogicY = LogicY + step
  130.         CurY = CurY - step
  131.         isKey = 1
  132.     endi
  133.     do Cursor with CurX,CurY
  134.     case key = 5
  135.     do Cursor with CurX,CurY
  136.     CurY = CurY - step
  137.     if ( CurY < uLimit )
  138.         LogicY = LogicY - step
  139.         CurY = CurY + step
  140.         isKey = 1
  141.     endi
  142.     do Cursor with CurX,CurY
  143.     if LogicY < 0
  144.         LogicY = 0
  145.         isKey = 0
  146.     endif
  147.     case key = 4
  148.     do Cursor with CurX,CurY
  149.     CurX = CurX + step
  150.     if CurX > rLimit
  151.         LogicX = LogicX + step
  152.         CurX = CurX - step
  153.         isKey = 1
  154.     endi
  155.     do Cursor with CurX,CurY
  156.     case key = 19
  157.     do Cursor with CurX,CurY
  158.     CurX=CurX-step
  159.     if CurX < lLimit
  160.         LogicX = LogicX - step
  161.         CurX = CurX + step
  162.         isKey = 1
  163.     endi
  164.     do Cursor with CurX,CurY
  165.     if LogicX<0
  166.         LogicX=0
  167.         isKey=0
  168.     endif
  169.     otherwise
  170.        isKey=0
  171. endcase
  172. enddo
  173. return
  174.  
  175. PROC    fieldch
  176. PARA X0,Y0,WinFdNum,dbName
  177.      sele 9
  178.      USE &dbName
  179.      PUBLIC RecNum
  180.      PUBLIC Locat0
  181.      PUBLIC KeyValue
  182.      PUBLIC FilePtr
  183.      Call Tab With chr(24)+' '+str(X0*8)+str(Y0*18)+' '+'0'
  184.      RecNum=RECCOUNT()
  185.      GO TOP
  186.      i=1
  187.      FilePtr=1
  188.      Locat0=1
  189.      KeyValue=0
  190.      i=0
  191.  
  192.      SET COLO TO 0+/W*+
  193.      GO TOP
  194.      DO WHILE ((.NOT. EOF()) .AND. (i<WinFdNum))
  195.      @ Y0+i,X0 SAY FIELD_NAME
  196.      i=i+1
  197.      SKIP
  198.      ENDD
  199.  
  200.      GO TOP
  201.      SET COLO  TO W+/r
  202.      @Y0,X0 SAY FIELD_NAME
  203.  
  204.      DO WHILE .T.
  205.      KeyValue=INKEY(0)
  206.      DO CASE
  207.          CASE KeyValue=5
  208.          DO UpDo WITH Y0,X0
  209.          CASE KeyValue=24
  210.          DO DnDo WITH Y0,X0
  211.          CASE KeyValue=13
  212.          set colo to
  213.          RETU rtrim(FIELD_NAME)
  214.          CASE KeyValue=27
  215.          set colo to
  216.          RETU ""
  217.      ENDCASE
  218. ENDDO
  219.  
  220. PROC UpDo
  221.     PARA Y0,X0
  222.     IF FilePtr<>1
  223.     IF Locat0<>1
  224.         SET COLO TO 0+/W*+
  225.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  226.         SKIP -1
  227.         FilePtr=FilePtr-1
  228.         Locat0=Locat0-1
  229.         SET COLO TO W+/r
  230.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  231.     ELSE
  232.         SKIP -1
  233.         FilePtr=FilePtr-1
  234.         SET COLO TO W+/r
  235.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  236.         SKIP
  237.         i=1
  238.         DO WHILE ((.NOT. EOF()) .AND. (i<WinFdNum))
  239.         SET COLO TO 0+/W*+
  240.         @ Y0+i,X0 SAY FIELD_NAME
  241.         SKIP
  242.         i=i+1
  243.         ENDDO
  244.         GO FilePtr
  245.     ENDIF
  246.     ENDIF
  247. RETU
  248.  
  249. PROC DnDo
  250.     PARA Y0,X0
  251.     IF FilePtr<>RecNum
  252.     IF Locat0<WinFdNum
  253.         SET COLO TO 0+/W*+
  254.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  255.         SKIP
  256.         FilePtr=FilePtr+1
  257.         Locat0=Locat0+1
  258.         SET COLO TO W+/r
  259.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  260.     ELSE
  261.         SKIP
  262.         FilePtr=FilePtr+1
  263.         SET COLO TO W+/r
  264.         @ Y0+Locat0-1,X0 SAY FIELD_NAME
  265.         i=WinFdNum-1
  266.         SKIP -1
  267.         DO WHILE (i>0)
  268.         SET COLO TO 0+/W*+
  269.         @ Y0+i-1,X0 SAY FIELD_NAME
  270.         SKIP-1
  271.         i=i-1
  272.         ENDDO
  273.         GO FilePtr
  274.     ENDIF
  275.     ENDIF
  276. RETU
  277.  
  278.  
  279. *╧╘╩╛╩«╫╓╣Γ▒Ω
  280. PROC Cursor
  281.     PARA xr,yr
  282.     call TAB with chr(23)+' '+str(xr)+str(yr)
  283. RETURN
  284.  
  285. *╧╘╩╛▒¿▒φ
  286. PROC DispTab
  287. call TAB with chr(15) +' '+str(LogicX)+' '+str(LogicY)
  288. call TAB with chr(16)
  289. go top
  290. do while .not. eof()
  291. if CellType=1 .OR. CellType=20 .OR. CellType=2 .OR. CellType=9 .OR. CellType=10 .OR. CellType=3 .OR. CellType=4 .OR. CellType=5
  292. IF CellType=4
  293.     call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y1)
  294.     call TAB with chr(25) + ' 3'
  295. ENDI
  296.  
  297. IF CellType=20
  298.     call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y1)
  299.     call TAB with chr(25) + ' '+str(6)
  300. ENDI
  301.  
  302. IF CellType=3
  303.     call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y1)
  304.     call TAB with chr(25) + ' '+str(5)
  305. ENDI
  306. do case
  307.     case UP=0
  308.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  309.        call TAB with "7"
  310.        call TAB with "0 "+str(X0)+str(Y0+1)+str(X1)+str(Y0+1)
  311.        call TAB with "7"
  312.     case UP=1
  313.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  314.        call TAB with "7"
  315.     case UP=2
  316.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  317.        call TAB with "7"
  318.        call TAB with "0 "+str(X0)+str(Y0+2)+str(X1)+str(Y0+2)
  319.        call TAB with "7"
  320.      case UP=3
  321.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  322.        call TAB with "7"
  323.        call TAB with "0 "+str(X0-2)+str(Y0-2)+str(X1+2)+str(Y0-2)
  324.        call TAB with "7"
  325.        call TAB with "0 "+str(X0-3)+str(Y0-3)+str(X1+3)+str(Y0-3)
  326.        call TAB with "7"
  327. endcase
  328.  
  329. do case
  330.     case LEFT=0
  331.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  332.        call TAB with "7"
  333.        call TAB with "0 "+str(X0+1)+str(Y0)+str(X0+1)+str(Y1)
  334.        call TAB with "7"
  335.        case LEFT=1
  336.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  337.        call TAB with "7"
  338.        case LEFT=2
  339.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  340.        call TAB with "7"
  341.        call TAB with "0 "+str(X0+2)+str(Y0)+str(X0+2)+str(Y1)
  342.        call TAB with "7"
  343.     case LEFT=3
  344.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  345.        call TAB with "7"
  346.        call TAB with "0 "+str(X0-2)+str(Y0-2)+str(X0-2)+str(Y1+2)
  347.        call TAB with "7"
  348.        call TAB with "0 "+str(X0-3)+str(Y0-3)+str(X0-3)+str(Y1+3)
  349.        call TAB with "7"
  350. endcase
  351. if Y1=TabYE
  352. do case
  353.     case DOWN=0
  354.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  355.        call TAB with "7"
  356.        call TAB with "0 "+str(X0)+str(Y1-1)+str(X1)+str(Y1-1)
  357.        call TAB with "7"
  358.     case DOWN=1
  359.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  360.        call TAB with "7"
  361.     case DOWN=2
  362.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  363.        call TAB with "7"
  364.        call TAB with "0 "+str(X0)+str(Y1-2)+str(X1)+str(Y1-2)
  365.        call TAB with "7"
  366.     case DOWN=3
  367.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  368.        call TAB with "7"
  369.        call TAB with "0 "+str(X0-2)+str(Y1+2)+str(X1+2)+str(Y1+2)
  370.        call TAB with "7"
  371.        call TAB with "0 "+str(X0-3)+str(Y1+3)+str(X1+3)+str(Y1+3)
  372.        call TAB with "7"
  373. endcase
  374. endif
  375. if X1=TabXE
  376. do case
  377.     case RIGHT=0
  378.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  379.        call TAB with "7"
  380.        call TAB with "0 "+str(X1-1)+str(Y0)+str(X1-1)+str(Y1)
  381.        call TAB with "7"
  382.     case RIGHT=1
  383.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  384.        call TAB with "7"
  385.     case RIGHT=2
  386.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  387.        call TAB with "7"
  388.        call TAB with "0 "+str(X1-2)+str(Y0)+str(X1-2)+str(Y1)
  389.        call TAB with "7"
  390.     case RIGHT=3
  391.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  392.        call TAB with "7"
  393.        call TAB with "0 "+str(X1+2)+str(Y0-2)+str(X1+2)+str(Y1+2)
  394.        call TAB with "7"
  395.        call TAB with "0 "+str(X1+3)+str(Y0-3)+str(X1+3)+str(Y1+3)
  396.        call TAB with "7"
  397. endcase
  398. endif
  399.  
  400. call TAB with "0 "+str(X0)+' '+str(Y0)+' '+str(X1)+' '+str(Y1)
  401. call TAB with "2 "+trim(ltrim(VALUE))
  402.  
  403. if CellType<>9 .AND. CellType<>10
  404.    call TAB with 'D '+str(WIDTH)+' '+str(HEIGHT)+' '+str(WORDSTYLE)
  405.    call TAB with "5"
  406. else
  407.    call TAB with chr(18)+' '+str(CellType)
  408. endif
  409. endif
  410.  
  411. if CellType=8
  412.    call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y1)
  413.    call TAB with "7"
  414. endif
  415. skip
  416. endd
  417. RETURN
  418.  
  419. PROC MainLink
  420.     NO=LocateCel(CurX+LogicX-8,CurY+LogicY-50)
  421.     IF ( NO <> 0 )
  422.     m=fieldch(60,6,8,"MASTER")
  423.     sele 1
  424.     if len(m)=0
  425.        retu
  426.     endi
  427.     GO NO
  428.     REPL FNAME WITH m
  429.     REPL CellType WITH 3
  430.     REPL DBNAME WITH MASTERDB
  431.     REPL FTYPE WITH I->FIELD_TYPE
  432.     ENDI
  433.     isKey = 1
  434. RETU
  435.  
  436. PROC SlaveLink
  437.     *20╬¬═╖
  438.     NO=LocateCel(CurX+LogicX-8,CurY+LogicY-50)
  439.     IF ( NO <> 0 .and. CellType=20)
  440.     m=fieldch(60,6,8,"SLAVE")
  441.     sele 1
  442.     if len(m)=0
  443.        retu
  444.     endi
  445.     GO NO
  446.  
  447.     REPL FNAME WITH m
  448.     REPL DBNAME WITH MASTERDB
  449.     REPL FTYPE WITH I->FIELD_TYPE
  450.  
  451.     NAME=FNAME
  452.     TYPES=FTYPE
  453.     X=X0
  454.     GO TOP
  455.     DO WHILE .not. eof()
  456.     IF ( CellType = 4 .and. X0=X )
  457.         REPL FNAME WITH NAME
  458.         REPL FTYPE WITH TYPES
  459.     ENDI
  460.     SKIP
  461.     ENDD
  462.     ENDI
  463.     isKey = 1
  464. RETU
  465.  
  466. *╡Ñ╘¬╢¿╬╗
  467. PROC LocateCel
  468.     PARA X,Y
  469.     GO TOP
  470.     DO WHILE .not. EOF( )
  471.        IF ( X>X0 .and. X<X1 .and. Y>Y0 .and. Y<Y1 )
  472.        RETU RECNO( )
  473.        ENDI
  474.        SKIP
  475.     ENDD
  476. RETU 0
  477.  
  478. *╢¿╥σ┤╙┐Γ╩╫
  479. PROC  SHead
  480.     SY=0
  481.     GO TOP
  482.     DO WHILE .not. EOF( )
  483.     IF ( CellType=4 .or. CellType=20)
  484.         *╟σ
  485.         REPL CellType WITH 1
  486.         REPL DBNAME WITH ""
  487.         REPL FNAME WITH ""
  488.         REPL FTYPE WITH ""
  489.         REPL VALUE WITH ""
  490.      ENDI
  491.      SKIP
  492.     ENDD
  493.     IF ( LocateCel(CurX+LogicX-8,CurY+LogicY-50) <> 0 )
  494.     SY=Y0
  495.     GO TOP
  496.     DO WHILE .not. EOF( )
  497.         IF ( SY=Y0 )
  498.         *╢■╬¼╠ε╨┤╧ε
  499.         *20╬¬═╖
  500.         REPL CellType WITH 20
  501.         REPL DBNAME WITH SLAVEDB
  502.         REPL FTYPE WITH ""
  503.         REPL FNAME WITH ""
  504.         ENDI
  505.         SKIP
  506.     ENDD
  507.      ENDI
  508. RETU
  509.  
  510. *╢¿╥σ┤╙┐Γ╬▓
  511. PROC  STail
  512.     IF ( LocateCel(CurX+LogicX-8,CurY+LogicY-50) <> 0 )
  513.     TY=Y1
  514.     GO TOP
  515.     DO WHILE .not. EOF( )
  516.         IF ( Y0>=SY .and. Y0<TY .and. CellType<>20)
  517.         *╢■╬¼╠ε╨┤╧ε
  518.         REPL CellType WITH 4
  519.         REPL DBNAME WITH SLAVEDB
  520.         ENDI
  521.         SKIP
  522.     ENDD
  523.      ENDI
  524. RETU
  525.  
  526.  
  527. PROC ClearLink
  528.     NO=LocateCel(CurX+LogicX-8,CurY+LogicY-50)
  529.     IF ( NO <> 0 .and. CellType=3)
  530.     REPL FNAME WITH ""
  531.     REPL FTYPE WITH ""
  532.     REPL VALUE WITH ""
  533.     REPL CellType WITH 1
  534.     REPL DBNAME WITH ""
  535.     ENDI
  536.     isKey = 1
  537. RETU
  538.  
  539. *╢┴╚í
  540. PROC readLib
  541. sele 1
  542. index on Y0 to p
  543.  
  544. sele 9
  545. USE MASTER
  546. GO TOP
  547. public express
  548. store FIELD_NAME to express
  549. use
  550.  
  551. sele 2
  552. use &MASTERDB
  553. sele 3
  554. use &SLAVEDB
  555. index on &express to p3
  556. sele 2
  557. set rela to &express into C
  558. if(MAINNO>reccount())
  559.    MAINNO=MAINNO-1
  560.    ?chr(7)
  561. endif
  562. if(MAINNO<=0)
  563.    MAINNO=1
  564.    ?chr(7)
  565. ENDI
  566. go MAINNO
  567. public cmds
  568. sele 1
  569. go top
  570. do while .not. eof()
  571.    if ( CellType = 3  .or.CellType = 4  .or. CellType = 20   )
  572.        REPL VALUE WITH ""
  573.    endi
  574.    skip
  575. enddo
  576.  
  577. *╓≈┐Γ
  578. go top
  579. do while .not. eof()
  580.    if ( CellType = 3  .and. len(FNAME)<>0 )
  581.     do case
  582.     case FTYPE='C'
  583.     cmds='repl VALUE with '+'B->'+trim(ltrim(FNAME))
  584.     &cmds
  585.     case FTYPE='N'
  586.     cmds='repl VALUE with '+'str(B->'+trim(ltrim(FNAME))+')'
  587.     &cmds
  588.     case FTYPE='D'
  589.     cmds='repl VALUE with '+'DTOC(B->'+trim(ltrim(FNAME))+')'
  590.     &cmds
  591.     case FTYPE='M'
  592.     endcase
  593.    endi
  594.    skip
  595. enddo
  596.  
  597. *┤╙┐Γ
  598. temp=0
  599. go top
  600. do while .not. eof()
  601.     if ( (CellType=4 .or. CellType=20) .and. len(FNAME)<>0 )
  602.     if temp=0
  603.      temp=Y0
  604.     else
  605.     if(Y0<>temp)
  606.     sele 3
  607.     if eof()
  608.         exit
  609.     endif
  610.     skip
  611.     cmds=trim(express)+'<>'+'B->'+trim(express)
  612.     if (&cmds)
  613.        sele 2
  614.        use
  615.        sele 3
  616.        use
  617.        sele 1
  618.        return
  619.     endi
  620.     sele 1
  621.     temp=Y0
  622.     endif
  623.     endif
  624.     do case
  625.     case FTYPE='C'
  626.     cmds='repl VALUE with '+'C->'+trim(ltrim(FNAME))
  627.     &cmds
  628.     case FTYPE='N'
  629.     cmds='repl VALUE with '+'str(C->'+trim(ltrim(FNAME))+')'
  630.     &cmds
  631.     case FTYPE='D'
  632.     cmds='repl VALUE with '+'DTOC(C->'+trim(ltrim(FNAME))+')'
  633.     &cmds
  634.     case FTYPE='M'
  635.     endcase
  636.    endi
  637.    skip
  638. enddo
  639.  
  640. sele 2
  641. use
  642. sele 3
  643. use
  644. sele 1
  645. return
  646.  
  647. *╥╘╧┬╬¬┤≥╙í▒φ╕±
  648.  
  649. PROC PRINTTAB
  650. call TAB with "9"
  651. go top
  652. do while .not. eof()
  653. if CellType=1 .OR. CellType=2 .OR. CellType=20 .OR. CellType=9 .OR. CellType=10 .OR. CellType=3 .OR. CellType=4 .OR. CellType=5
  654. do case
  655.     case UP=0
  656.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  657.        call TAB with "8"
  658.        call TAB with "0 "+str(X0)+str(Y0+1)+str(X1)+str(Y0+1)
  659.        call TAB with "8"
  660.     case UP=1
  661.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  662.        call TAB with "8"
  663.     case UP=2
  664.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  665.        call TAB with "8"
  666.        call TAB with "0 "+str(X0)+str(Y0+2)+str(X1)+str(Y0+2)
  667.        call TAB with "8"
  668.      case UP=3
  669.        call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y0)
  670.        call TAB with "8"
  671.        call TAB with "0 "+str(X0-2)+str(Y0-2)+str(X1+2)+str(Y0-2)
  672.        call TAB with "8"
  673.        call TAB with "0 "+str(X0-3)+str(Y0-3)+str(X1+3)+str(Y0-3)
  674.        call TAB with "8"
  675. endcase
  676.  
  677. do case
  678.     case LEFT=0
  679.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  680.        call TAB with "8"
  681.        call TAB with "0 "+str(X0+1)+str(Y0)+str(X0+1)+str(Y1)
  682.        call TAB with "8"
  683.        case LEFT=1
  684.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  685.        call TAB with "8"
  686.        case LEFT=2
  687.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  688.        call TAB with "8"
  689.        call TAB with "0 "+str(X0+2)+str(Y0)+str(X0+2)+str(Y1)
  690.        call TAB with "8"
  691.     case LEFT=3
  692.        call TAB with "0 "+str(X0)+str(Y0)+str(X0)+str(Y1)
  693.        call TAB with "8"
  694.        call TAB with "0 "+str(X0-2)+str(Y0-2)+str(X0-2)+str(Y1+2)
  695.        call TAB with "8"
  696.        call TAB with "0 "+str(X0-3)+str(Y0-3)+str(X0-3)+str(Y1+3)
  697.        call TAB with "8"
  698. endcase
  699. if Y1=TabYE
  700. do case
  701.     case DOWN=0
  702.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  703.        call TAB with "8"
  704.        call TAB with "0 "+str(X0)+str(Y1-1)+str(X1)+str(Y1-1)
  705.        call TAB with "8"
  706.     case DOWN=1
  707.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  708.        call TAB with "8"
  709.     case DOWN=2
  710.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  711.        call TAB with "8"
  712.        call TAB with "0 "+str(X0)+str(Y1-2)+str(X1)+str(Y1-2)
  713.        call TAB with "8"
  714.     case DOWN=3
  715.        call TAB with "0 "+str(X0)+str(Y1)+str(X1)+str(Y1)
  716.        call TAB with "8"
  717.        call TAB with "0 "+str(X0-2)+str(Y1+2)+str(X1+2)+str(Y1+2)
  718.        call TAB with "8"
  719.        call TAB with "0 "+str(X0-3)+str(Y1+3)+str(X1+3)+str(Y1+3)
  720.        call TAB with "8"
  721. endcase
  722. endif
  723. if X1=TabXE
  724. do case
  725.     case RIGHT=0
  726.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  727.        call TAB with "8"
  728.        call TAB with "0 "+str(X1-1)+str(Y0)+str(X1-1)+str(Y1)
  729.        call TAB with "8"
  730.     case RIGHT=1
  731.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  732.        call TAB with "8"
  733.     case RIGHT=2
  734.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  735.        call TAB with "8"
  736.        call TAB with "0 "+str(X1-2)+str(Y0)+str(X1-2)+str(Y1)
  737.        call TAB with "8"
  738.     case RIGHT=3
  739.        call TAB with "0 "+str(X1)+str(Y0)+str(X1)+str(Y1)
  740.        call TAB with "8"
  741.        call TAB with "0 "+str(X1+2)+str(Y0-2)+str(X1+2)+str(Y1+2)
  742.        call TAB with "8"
  743.        call TAB with "0 "+str(X1+3)+str(Y0-3)+str(X1+3)+str(Y1+3)
  744.        call TAB with "8"
  745. endcase
  746. endif
  747.  
  748. call TAB with "0 "+str(X0)+' '+str(Y0)+' '+str(X1)+' '+str(Y1)
  749. call TAB with "2 "+trim(ltrim(VALUE))
  750.  
  751. if CellType<>9 .AND. CellType<>10
  752.    call TAB with 'D '+str(WIDTH)+' '+str(HEIGHT)+' '+str(WORDSTYLE)
  753.    call TAB with "6"
  754. else
  755.    call TAB with chr(19)+' '+str(CellType)
  756. endif
  757. endif
  758. if CellType=8
  759. call TAB with "0 "+str(X0)+str(Y0)+str(X1)+str(Y1)
  760. call TAB with "8"
  761. endif
  762. skip
  763. endd
  764. call TAB with chr(11)
  765. call TAB with chr(10)
  766. RETU
  767.