home *** CD-ROM | disk | FTP | other *** search
- /*********
- *
- * ALLOCATE.C
- *
- * by Leonard Zerman
- *
- * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
- *
- * Syntax: ALLOCATE( <expN> )
- * Return: <expC> with HEX address of allocated memory.
- * "" if error.
- *********/
- #include "trlib.h"
-
- TRTYPE allocate()
- {
- char *ptr, *ret;
- unsigned int size;
-
- ret = NULLS;
-
- if ( PCOUNT==1 && ISNUM(1) )
- {
- size = _parni(1);
- ptr = _tr_allocmem( (unsigned)(size+1) );
- if ( ptr )
- ret = _tr_hexasm(ptr);
- }
- _retc(ret);
- }
- /* eof */
-