home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv7.zip / vac22os2 / ibmcobol / macros / exitview.lx < prev    next >
Text File  |  1998-02-24  |  839b  |  30 lines

  1. /* This macro provides is invoked after pressing F4 */
  2. /* waits for an arrow key to determine which view to exit */
  3.  
  4. 'keyread'  /* wait for key */
  5. 'extract lastkey'
  6.  
  7. select
  8.   when lastkey = "UP" then do
  9.                  'LP_PREVRING'
  10.                  'LP_CLOSEVIEW'
  11.                   end
  12.   when lastkey = "DOWN" then do
  13.                  'LP_NEXTRING'
  14.                  'LP_CLOSEVIEW'
  15.                   end
  16.   when lastkey = "RIGHT" then do
  17.                  'LP_PREVRING'
  18.                  'LP_CLOSEVIEW'
  19.                   end
  20.   when lastkey = "LEFT" then do
  21.                  'LP_NEXTRING'
  22.                  'LP_CLOSEVIEW'
  23.                   end
  24.   when lastkey = "ESC" then do
  25.                   MSG 'Command canceled'
  26.                   end
  27.  
  28.   otherwise MSG 'You must choose an arrow key to quit the view'
  29.       end
  30.