home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MEMOGET.ZIP / MEMOGET.TXT
Encoding:
Text File  |  1988-10-11  |  2.0 KB  |  80 lines

  1. *****************************************************************************
  2. * FUNCTION MEMOGET() for Clipper Summer '87                                 *
  3. * by Steve Badaracco 10/5/88                                                *
  4. * Purpose:  To provide a way to perform a GET on a character string         *
  5. *           within a SET KEY procedure without using the READ statement.    *
  6. *           This function provides a better method than the ACCEPTAT()      *
  7. *           function provided with Clipper Summer '87.                      *
  8. * Syntax :  <memvar> = MEMOGET(<expN1>,<expN2>,<expN3>[,<expC>])            *
  9. *           <expN1> is the row (0..24) to put the get window                *
  10. *           <expN2> is the col (0..74) to BEGIN the get window              *
  11. *           <expN3> is the row (0..79) to END the get window                *
  12. *           <expC>  (optional) is a character string to be edited in the    *
  13. *                   get window.  If not specified, a blank window will be   *
  14. *                   provided to create a new string.                        *
  15. * Returns:  The TRIM()ed result of the MEMOEDIT()ed string when the "Enter" *
  16. *           key is pressed.  "Esc" is disabled during the operation.        *
  17. * Note   :  Minimum width of a MEMOEDIT() window is 6 characters.           *
  18. *****************************************************************************
  19. Function MemoGet
  20. parameters mg_row,mg_cola,mg_colb,mg_old
  21. private stringy
  22. stringy = if(type('mg_old')#'C','',mg_old)
  23. set key 27 to memogete
  24. stringy = memoedit(stringy,mg_row,mg_cola,mg_row,mg_colb,true,'memogetf',2000)
  25. set key 27 to
  26. return trim(stringy)
  27. *
  28. Function MemoGetF     && process the "Enter" key
  29. parameters mguf_stat,mguf_line,mguf_col
  30. if (mguf_stat # 3) .and. (lastkey()=13)
  31.    keyboard Chr(23)
  32. endif
  33. return 0
  34. *
  35. Procedure MemoGetE    && process the "Esc" key
  36. parameters a,b,c
  37. keyboard ""
  38. return
  39. *
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.