home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a013 / 1.ddi / SAMPLES.EXE / T_GETS.PRG < prev    next >
Encoding:
Text File  |  1991-01-25  |  1.6 KB  |  54 lines

  1. *****************************************************************
  2. * Test program for SAVEGETS and RESTGETS -  FILE T_GETS.PRG
  3. *****************************************************************
  4.  
  5. * Copyright(c) 1991 -- James Occhiogrosso
  6.  
  7. # include "inkey.ch"
  8.  
  9. LOCAL nothing1 := nothing2 := nothing3 := nothing4 := ;
  10.       nothing5 := nothing6 := nothing7 := space(10)
  11.  
  12. INITGLOBAL()
  13. SETCOLOR(colstd)
  14. CLEAR
  15.  
  16. SET KEY K_F10 TO NEST1   // Set f10 to call first nested read
  17. CENTERON(MAXROW(), 'Press F10 for next level')
  18.  
  19. DO WHILE LASTKEY() != K_ESC
  20.       @ 10, 10 GET nothing1
  21.       @ 11, 10 GET nothing2
  22.       @ 12, 10 GET nothing3
  23.      READ
  24. ENDDO
  25. RETURN NIL
  26.  
  27.  
  28. **************
  29. FUNCTION NEST1
  30. **************
  31.     SET KEY K_F10 TO NEST2    // Set F10 to next nesting level
  32.     SAVEGETS()                // Save current GETS
  33.     @ 17, 10 GET nothing4     // Add new variables to get list
  34.     @ 18, 10 GET nothing5
  35.     READ                      // Read them
  36.     RESTGETS()                // Restore previous set of GETS
  37.     @ 17,10 CLEAR TO 18,20
  38.     SET KEY K_F10 TO NEST1    // ReSet F10 to first nesting level
  39. RETURN NIL
  40.  
  41. **************
  42. FUNCTION NEST2
  43. **************
  44.     SET KEY K_F10 TO             // Clear hotkey F10
  45.     SAVEGETS()                // Save current GETS
  46.     @ 17, 40 GET nothing6     // Add new variables to get list
  47.     @ 18, 40 GET nothing7
  48.     READ                      // Read them
  49.     RESTGETS()                // Restore previous set of GETS
  50.     @ 17,40 CLEAR TO 18,50
  51.     SET KEY K_F10 TO NEST1    // ReSet F10 to first nesting level
  52. RETURN NIL
  53.  
  54.