USR DYNAMICITEMSIZE( arrayPtr& )
Revised: November; 2006 (FB 4, Release 4)
Description - This function returns the element size specified when the array was DIMensioned. This is a runtime equivalent of SIZEOF( gMyDynamicArray ), which is actually a compiler directive. It is for use in generic functions where only the address of the dynamic array is known to avoid the necessity of passing the size as a parameter.
Note: Whether currently populated or not, a dynamic array must have held data at some point before being passed to this function.
arrayPtr& is a pointer to any FutureBASIC Dynamic Array previously dimensioned using DYNAMIC or DIMÊDYNAMIC. In typical usage, this address will come from a parameter to the calling function, such as ( @arrayPtr AS PTR ), to which the name of a dynamic array would be passed.
See Also DEF DYNAMICINSERTITEMS; DEF DYNAMICREMOVEITEMS; SIZEOF