ListAppendToArray
InstallShield 2022 ยป InstallScript Language Reference
Project:This information applies to InstallScript projects.
The ListAppendToArray function appends the elements in the list that is specified by listSource to the array that is specified by varResult, resizing the array appropriately to store the new elements.
Syntax
ListAppendToArray ( varResult, listSource, bString );
Parameters
Parameter |
Description |
varResult |
Specifies an array. |
listSource |
Specifies the list to append to the array. The list identified by listSource must already have been initialized by a call to ListCreate. |
bString |
Set this parameter to TRUE if varResult is a string array and listSource is a string list; set this parameter to FALSE if varResult is a number array and listSource is a number list. |
Return Values
Return Value |
Description |
>= 0 |
The new number of elements in the array. |
< ISERR_SUCCESS |
Indicates that the function was unable to append the list to the array. |
Comments
The array and list types must match (that is, both be string or both be numeric) or the function will fail. If necessary, convert the data appropriately by calling ListConvertNumToStr or ListConvertStrToNum before calling ListAppendToArray.
The current size of the array determines where the end of the array is and thus where the new elements are placed. For example, if the size of the array is 10 but only one element contains a string, the new data is still added as the 11th and later elements. If you use an autosized array the new elements are added to the end of the array.
See Also