home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Deltkey
-
- PARAMETERS _tstring
-
- * first check the parameter
- * next see if the key is in the stack. If so,
- * just blank out the element
- * The follow is a table:
- * 0 = Did not add do improper parameter or array is not there
- * -1 = Item not in the array to delete
- * >0 = Element position now blanked out
-
- IF TYPE("_tstring") != "C"
- RETURN(0)
- ELSEIF EMPTY(AT("/", _tstring)) && Must be a good string
- RETURN(0)
- ELSEIF TYPE("setkeys") != "A" && No array is present
- RETURN(0)
- ENDIF
-
- PRIVATE _first, _second, _qaz
-
- _first = LTRIM(TRIM(SUBSTR(_tstring, 1, AT("/", _tstring)-1 )))
- _second = TRIM(SUBSTR(_tstring, AT("/", _tstring)+1 ))
-
- FOR _qaz = 1 TO LEN(setkeys)
- IF _first = LTRIM(TRIM(SUBSTR(setkeys[_qaz], 1, AT("/", setkeys[_qaz])-1 )))
- setkeys[_qaz] = ""
- RETURN(_qaz)
- ENDIF
- NEXT
- RETURN(-1)
-
- * End of File