home *** CD-ROM | disk | FTP | other *** search
- /*********
- * HEX.C
- *
- * by Ralph Davis
- * modified by Tom Rettig
- *
- * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
- *
- * Syntax: HEX( <expN> )
- * Return: Hexadecimal equivalent of <expN> as <expC>
- *********/
-
- #include "trlib.h"
-
- TRTYPE hex()
- {
- static char funcname[] = { "hex" };
-
- if ( PCOUNT==1 && ISNUM(1) )
- {
- long decnum = (long) _parnd(1);
- char *_tr_hexasm();
- _retc( _tr_hexasm(decnum) ); /* _tr_hexasm() does all the work */
- }
- else
- _retc( _tr_errmsgs(funcname,E_SYNTAX) );
- }
-