home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
xbase
/
library
/
clipper
/
rettig
/
source
/
allocate.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-21
|
564b
|
32 lines
/*********
*
* 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 */