home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / macros / tabins.lx < prev    next >
Encoding:
Text File  |  1996-02-22  |  802 b   |  38 lines

  1. /* LPEX macro to simulate normal editor function for a tab key */
  2. /* by Vincent Greene */
  3.  
  4.  'extract cursorpos length tabs inserting'
  5.  
  6.  if (inserting = 'OFF') | (cursorpos > length) then do
  7.         'primitive nexttab'
  8.         return
  9.         end
  10.  
  11.  stop = 0
  12.  
  13.  do until stop > cursorpos
  14.         last = stop
  15.         parse var tabs stop tabs
  16.  
  17.         if stop = 'EVERY' then leave
  18.  
  19.         if stop = '' then leave
  20.         end
  21.  
  22.  if stop = 'EVERY' then do
  23.         stop = last
  24.         parse var tabs increment
  25.         if increment = '' then leave
  26.                 do until stop > cursorpos
  27.                 stop = stop + increment
  28.                 end
  29.         end
  30.  
  31.  
  32.  if stop \= '' then
  33.         do x=cursorpos to stop-1
  34.                 'primitive char " "'
  35.         end
  36.  
  37. exit 0
  38.