JCL Help:DynArrayInitialize

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Initializes a dynamic array for use.


Parameters

Parameters Description
A The dynamic array variable to initialize.
ElementSize Size, in bytes, of the elements contained in the dynamic array. Always use the SizeOf operator for this parameter. For example, if A is declared as a TDynIntegerArray then use SizeOf(Integer) for this parameter.
InitialLength Initial size of the array. That is, the number of elements in the array. The function allocates enough memory to hold at least InitialLength number of elements and initializes them to 0. You can immediately start to use them without the need to call DynArraySetLength. You can pass 0 if you don't want to initialize the length of the array.


Description

DynArrayInitialize initializes a dynamic array variable for use. You must call this function before using the dynamic array. The function allocates memory for the maintenance data and initial elements, if directed to do so. Initial elements are initialized to 0 and can be used immediately without having to call DynArraySetLength. When you are done using the array you must release its memory by calling DynArrayFinalize.


See Also

DynArrayAllocSize DynArrayLength DynArrayElemSize DynArrayFinalize DynArraySetLength


About

Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page