home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST295.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  1.0 KB  |  38 lines

  1. *******************
  2.  
  3. FUNCTION Setkeyval
  4.  
  5.    PARAMETERS _thekey
  6.  
  7.    IF EMPTY(PCOUNT())
  8.       RETURN("")
  9.    ELSEIF TYPE("_thekey") != "N"
  10.       RETURN("")
  11.    ELSEIF TYPE("setkeys") = "U"
  12.       RETURN("")
  13.    ENDIF
  14.  
  15.    PRIVATE _qaz, _tempkey  && I could use ASCAN() but this method
  16.                            && assures me that the item is found or not
  17.  
  18.    _tempkey = LTRIM(TRIM(STR(_tempkey)))
  19.  
  20.    FOR _qaz = 1 TO LEN(setkeys)
  21.       IF TYPE("setkeys[x]") != "U"          && Subscript Defined
  22.          IF !EMPTY(setkeys[x])                                              && Subscript contains something
  23.             IF !EMPTY(AT("/", setkeys[x]))                                  && Subscript is proper
  24.                value = SUBSTR(setkeys[x], 1, AT("/", setkeys[x])-1 )
  25.                todo  = TRIM(SUBSTR(setkeys[x],    AT("/", setkeys[x])+1 ))
  26.  
  27.                IF _tempkey $ value
  28.                   RETURN(UPPER(TRIM(todo)))
  29.                ENDIF
  30.  
  31.             ENDIF
  32.          ENDIF
  33.       ENDIF
  34.    NEXT
  35.    RETURN("")
  36.  
  37. * End of File
  38.