home *** CD-ROM | disk | FTP | other *** search
- *******************
-
- FUNCTION Decihexi
-
- PARAMETERS _thenum
-
- IF EMPTY(PCOUNT())
- RETURN("")
- ENDIF
- IF !(TYPE("_thenum") $ "CN")
- RETURN("") && For the Larry J's of the world. Argh!!!
- ELSE
- IF TYPE("_thenum") = "N"
- _thenum = LTRIM(STR(_thenum))
- ENDIF
- ENDIF
-
- PRIVATE _final, _steve
-
- _final = IF( !EMPTY(_thenum), INT(VAL(_thenum)), 0)
- _steve = "" && So I do have an ego, at least I've got version numbers
- DO WHILE _final >= 16
- _steve = DECIVERT( INT( _final % 16) ) + _steve
- _final = _final / 16
- ENDDO
- RETURN( DECIVERT( INT( _final) ) + _steve )
-
- *******************
-
- FUNCTION Decivert
-
- PARAMETER _hexval
-
- RETURN(IF( EMPTY(_hexval), "0", SUBSTR("123456789ABCDEF", _hexval, 1)))
-
- * End of File
-