Crt_CAlloc

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Core Language > BuiltIn Functions > Memory handling and pointers > Crt memory >

Crt_CAlloc

 

Description

 

Allocates an array in memory with elements initialized to 0.

 

Syntax

 

ptr = Crt_CAlloc(lNum, lSize)

 

Returns

 

Number: pointer to the allocated memory area.

If returned value is zero, an error has occurred.

 

Parameters

 

Name

Type

Optional

Meaning

lNum

Number

No

Number of elements.

lSize

Number

No

Length in bytes of each element.

 

Remarks

 

This function allocates storage space for an array of lNum elements, each of length lSize bytes.

Each element is initialized to 0.

 

Restrictions

 

See also

 

Examples