Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel VB Language Reference > Using Siebel VB > About Data Types > ArraysTo create an array, you specify one or more subscripts when you declare the array or when the Declare Array method redimensions the array. A subscript specifies the beginning and ending index for each dimension. If you specify only an ending index, then the beginning index depends on the Set Array Lower Boundary method. To reference an array element, you enclose each index value in parentheses after the array name. For example, the following format describes an array that includes three dimensions: You can use an array with the following data types: Siebel VB does not support the following items: For more information, see the following topics: For examples that use arrays, see the following topics:
Dynamic ArraysIf you declare a dynamic array, then you do not specify a subscript range for the array elements. You can use the Declare Array method to set the subscript range. You can write code that sets the number of elements in a dynamic array according to other conditions that your code specifies. For example, you might use an array to store a set of values that the user enters, but you might not know in advance how many values the user will enter. In this situation, you can do one of the following:
If you use the Declare Array method to modify the size of an array, and if you must preserve the contents of this array, then make sure you include the following Preserve argument in the Declare Array method: If you use a Declare Variable statement to declare a dynamic array, then it can include no more than eight dimensions. You must use the Declare Array method to create a dynamic array that includes more than eight dimensions. This method allows you to declare an array that includes up to 60 dimensions. For more information, see Declare Variable Statement and Declare Array Method. You cannot use the Declare Array method to modify the number of dimensions of a dynamic array if the array already has dimensions. It can modify only the upper and lower boundaries of the dimensions of the array. For information about methods that can determine the current boundaries of an array, see Get Array Lower Boundary Method and Get Array Upper Boundary Method. Example of a Dynamic ArrayThe following example code uses a dynamic array named Sub main |
![]() ![]() |
Siebel VB Language Reference | Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |