home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / levensup.prg < prev    next >
Text File  |  1993-10-14  |  1KB  |  53 lines

  1. /*
  2.  * GT CLIPPER STANDARD HEADER
  3.  *
  4.  * File......: levensup.prg
  5.  * Author....: Andy M Leighton
  6.  * BBS.......: The Dark Knight Returns
  7.  * Net/Node..: 050/069
  8.  * User Name.: Andy Leighton
  9.  * Date......: $Date$
  10.  * Revision..: $Revision$
  11.  *
  12.  * This is an original work by Andy Leighton and is placed in the
  13.  * public domain.
  14.  *
  15.  * Modification history:
  16.  * ---------------------
  17.  *
  18.  * $Log$
  19.  *
  20.  */
  21.  
  22. #include "gt_LIB.ch"
  23. #include "levensht.ch"
  24.  
  25. /*
  26.  * support routines only
  27.  * do not call gGT_Cost from your program
  28.  */
  29.  
  30. static opTable := {                                ;
  31.                      { 0, "EQU", -1, -1 },         ;
  32.                      { 1, "INS",  0, -1 },         ;
  33.                      { 1, "DEL", -1,  0 },         ;
  34.                      { 1, "SUB", -1, -1 }          ;
  35.                   }
  36.  
  37. /*
  38.  * Support Function: gGT_Cost()
  39.  *
  40.  * get/set routine for accessing Cost in the opTable
  41.  */
  42.  
  43. function gGT_Cost(op, nNewCost)
  44.  
  45.    local nCost := opTable[op][1]
  46.  
  47.    if nNewCost != NIL
  48.       opTable[op][1] := nNewCost
  49.    endif
  50.  
  51. return nCost
  52.  
  53.