home *** CD-ROM | disk | FTP | other *** search
- *******************
-
- FUNCTION Setkeyval
-
- PARAMETERS _thekey
-
- IF EMPTY(PCOUNT())
- RETURN("")
- ELSEIF TYPE("_thekey") != "N"
- RETURN("")
- ELSEIF TYPE("setkeys") = "U"
- RETURN("")
- ENDIF
-
- PRIVATE _qaz, _tempkey && I could use ASCAN() but this method
- && assures me that the item is found or not
-
- _tempkey = LTRIM(TRIM(STR(_tempkey)))
-
- FOR _qaz = 1 TO LEN(setkeys)
- IF TYPE("setkeys[x]") != "U" && Subscript Defined
- IF !EMPTY(setkeys[x]) && Subscript contains something
- IF !EMPTY(AT("/", setkeys[x])) && Subscript is proper
- value = SUBSTR(setkeys[x], 1, AT("/", setkeys[x])-1 )
- todo = TRIM(SUBSTR(setkeys[x], AT("/", setkeys[x])+1 ))
-
- IF _tempkey $ value
- RETURN(UPPER(TRIM(todo)))
- ENDIF
-
- ENDIF
- ENDIF
- ENDIF
- NEXT
- RETURN("")
-
- * End of File