home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a085 / 1.ddi / EXP5_15.PRG < prev    next >
Encoding:
Text File  |  1994-01-10  |  2.0 KB  |  57 lines

  1. *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤
  2. *⌐ª      Program: EXP5_13.PRG                                          ⌐ª
  3. *⌐ª     Function: ╔╧╡»╩╜▓╦╡Ñ╤í╧ε╢α┤╬╤í╘±╫≈▒Ω╝╟╡─╖╢└²                   ⌐ª
  4. *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
  5. SET TALK OFF
  6.  
  7. * ╢¿╥σ╥╗╕÷╧╘╩╛╩²╛▌┐Γ╔╧╡»╩╜▓╦╡Ñ:database
  8. DEFINE POPUP database FROM 2,10 PROMPT FILES LIKE *.DBF
  9. ON SELECTION POPUP database DO Database
  10.  
  11. * ╢¿╥σ╥╗╕÷╧╘╩╛╩²╛▌┐Γ╫╓╢╬╡─╔╧╡»╩╜▓╦╡Ñ:fieldlist
  12. DEFINE POPUP fieldlist FROM 2,10 MARGIN MULTI MARK  CHR(4);
  13.        MESSAGE "Press <Enter> to choose fields, then <Esc> to exit"
  14.        * ╩╣╙├▓╬╩² MULTI ╘╩╨φ═¼╩▒╤í╘±╢α╕÷╤í╧ε
  15. CLEAR
  16. @ 1,5 SAY "╤í╘±╥╗╕÷╩²╛▌┐Γ:"
  17. ACTIVATE POPUP database                   && ╝ñ╗ε▓╦╡Ñ╥╘╤í╘±╥╗╕÷╩²╛▌┐Γ
  18.  
  19. IF NOT EMPTY(DBF())                       && ╚τ╣√╤í╘±┴╦╥╗╕÷╩²╛▌┐Γ
  20.    CLEAR
  21.    mfieldlist = ""                        && ╫╓╢╬╤í╘±▒Σ┴┐
  22.    @ 1,5 SAY "╤í╘±╫╓╢╬:"
  23.    ACTIVATE POPUP fieldlist               && ╝ñ╗ε▓╦╡Ñ╧╘╩╛╩²╛▌┐Γ╫╓╢╬
  24.    DO Fieldlist                           && ╡≈╙├ FIeldlist ╥╘╫≈▒Ω╝╟
  25.    BROWSE &mfieldlist                     && Σ»└└╦∙╤í╘±╡─╫╓╢╬
  26. ENDIF
  27. RELEASE POPUP database, fieldlist
  28. CLOSE DATABASES
  29. CLEAR
  30. RETURN
  31.  
  32. * ╤í╘±╩²╛▌┐Γ┤ª└φ
  33. PROCEDURE Database
  34. USE PROMPT()                              && ┤≥┐¬╦∙╤í╘±╡─╩²╛▌┐Γ
  35. FOR mcount = 1 TO FCOUNT()
  36.     DEFINE BAR mcount OF fieldlist PROMPT FIELD(mcount)
  37.     * ├┐╕÷╫╓╢╬╢¿╥σ╬¬▓╦╡Ñ╡─╥╗╕÷╤í╧ε
  38. ENDFOR
  39. DEACTIVATE POPUP database
  40. RETURN
  41.  
  42. * ╤í╘±╫╓╢╬┤ª└φ
  43. PROCEDURE Fieldlist
  44. FOR mcount = 1 TO CNTBAR("fieldlist")     && ╢╘├┐╕÷╤í╧ε╫°┤ª└φ
  45.     SET MARK OF BAR mcount OF fieldlist TO MRKBAR("fieldlist",mcount)
  46.     * ╢╘├┐╕÷╤í╧ε╫°┤ª└φ
  47.     IF MRKBAR("fieldlist", mcount)         && ╤í╧ε▒╗▒Ω╝╟╡─┤ª└φ
  48.        mfieldlist = mfieldlist + PRMBAR("fieldlist", mcount) + ","
  49.        * ╘┌╫╓╢╬╤í╘±▒Σ┴┐╓╨╘÷╝╙╫╓╢╬║═╢║║┼
  50.     ENDIF
  51. ENDFOR
  52. IF NOT EMPTY(mfieldlist)                  && ╚τ╣√╓┴╔┘╤í╘±┴╦╥╗╕÷╫╓╢╬
  53.    mfieldlist = "FIELDS " + LEFT(mfieldlist, LEN(mfieldlist)-1)
  54.    *╘┌╫╓╢╬╤í╘±▒Σ┴┐╓╨╘÷╝╙ "FILEDS", ▓ó│²╚Ñ╬▓▓┐╢║║┼.
  55. ENDIF
  56. RETURN
  57.