home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a067 / 1.img / GRUMP501.EXE / GKILLGET.PRG < prev    next >
Encoding:
Text File  |  1991-05-02  |  693 b   |  33 lines

  1. /*
  2.     Function: GKillGet()
  3.     Purpose:  Remove a GET from the getlist array
  4.     Author:   Greg Lief
  5.     Dialect:  Clipper 5.x
  6.     Copyright (c) 1991 Greg Lief
  7. */
  8. function gkillget(victim)
  9. local ele
  10. memvar getlist
  11. do case
  12.  
  13.    case valtype(victim) == 'C'
  14.       ele := ascan(getlist, { | a | upper(victim) $ upper(a:name) } )
  15.  
  16.    case valtype(victim) == 'N'
  17.       if victim > len(getlist)
  18.          ele := len(getlist)
  19.       else
  20.          ele := max(victim, 1)
  21.       endif
  22.  
  23.    otherwise
  24.       ele := ascan(getlist, { | a | getactive():name $ a:name } )
  25.  
  26. endcase
  27. if ele > 0
  28.    asize(adel(getlist, ele), len(getlist) - 1)
  29. endif
  30. return (ele > 0)
  31.  
  32. * eof GKILLGET.PRG
  33.