home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP26.EXE / CHP2605.PRG < prev    next >
Encoding:
Text File  |  1991-06-12  |  948 b   |  47 lines

  1. /*
  2.    Listing 26.5 Parallel GETs with Stack-Based Functions
  3.    Author: Greg Lief
  4.    NOTE: calls GFSaveGets() and GFRestGets(), which are
  5.          contained in the file CHP2604.PRG
  6.    Excerpted from "Clipper 5: A Developer's Guide"
  7.    Copyright (c) 1991 M&T Books
  8.                       501 Galveston Drive
  9.                       Redwood City, CA 94063-4728
  10.                       (415) 366-3600
  11. */
  12.  
  13. //───── NOTE: must compile with the /N option!
  14.  
  15. memvar getlist
  16.  
  17. function setsogets
  18. local x := { 1, 2, 3, 4, 5, 6, 7, 8, 9}, y, z
  19. for z = 1 to 3
  20.    for y = 1 to 3
  21.       @ y * 2, 0 get x[(z - 1) * 3 + y]
  22.    next
  23.    gfsavegets()
  24. next
  25. cls
  26. gfrestgets(2)
  27. reget()
  28. read
  29. gfrestgets(1)
  30. reget()
  31. read
  32. gfrestgets(3)
  33. reget()
  34. read
  35. aeval(x, { | a | qout(a) } )
  36. return nil
  37.  
  38.  
  39. /*
  40.    ReGet(): redisplay all active GETs
  41. */
  42. static function reget
  43. aeval(getlist, { | get | get:display() } )
  44. return nil
  45.  
  46. // end of file CHP2605.PRG
  47.