This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
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 [, AllowEmptyStringAllocation])
Returns
Number: pointer to the allocated memory area.
If returned value is zero, an error has occurred.
Parameters
Name |
Type |
Optional |
Meaning |
String |
String |
No |
String data to allocate |
AllowEmptyStringAllocation |
Number |
Yes |
If this parameter is omitted or %FALSE, no memory allocation will take place if String is empty. In this case 0 (zero) will be returned. If this parameter is %TRUE, a memory block will be allocated in any case even if String will be empty. |
Remarks
Restrictions
If an empty string is passed, no memory allocation will take place unless AllowEmptyStringAllocation is %TRUE.
See also
Examples