Navigation:  thinBasic Modules > Core > Memory handling > Heap memory >

HEAP_ALLOCBYSTR

Previous pageReturn to chapter overviewNext page

 

Description

 

Allocates a block of memory from a heap.

The size of the block is the size of the passed string

The passed string is copied into the new memory block

If the function succeeds, the return value is a pointer to the allocated memory block.

 

Syntax

 

ptr = HEAP_AllocByStr(String)

 

Returns

 

Number: pointer to the allocated memory area.

If returned value is zero, an error has occurred.

 

Parameters

 

Name

Type

Optional

Meaning

String

Number

No

String data to allocate

 

Remarks

 

Restrictions

 

See also

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com