vb6parse 1.0.0

vb6parse is a library for parsing and analyzing VB6 code, from projects, to controls, to modules, and forms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="VB6Parse Library Reference - ubound - Arrays">
    <title>ubound - Arrays - VB6Parse Library Reference</title>
    <link rel="stylesheet" href="../../../assets/css/style.css">
    <link rel="stylesheet" href="../../../assets/css/docs-style.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css">
    <script src="../../../assets/js/theme-switcher.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/vbnet.min.js"></script>
    <script>hljs.highlightAll();</script>
</head>
<body>
    <header class="docs-header">
        <div class="container">
            <h1><a href="../../../index.html">VB6Parse</a> / <a href="../../../library/index.html">Library</a> / <a href="../../../library/functions/arrays/index.html">Arrays</a> / ubound</h1>
            <p class="tagline">VB6 Library Reference</p>
        </div>
    </header>

    <nav class="docs-nav">
        <div class="container">
            <a href="../../../index.html">Home</a>
            <a href="../../../library/index.html">Library Reference</a>
            <a href="../../../documentation.html">Documentation</a>
            <a href="https://docs.rs/vb6parse" target="_blank">API Docs</a>
            <a href="https://github.com/scriptandcompile/vb6parse" target="_blank">GitHub</a>
            <button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
                <span class="theme-icon">🌙</span>
            </button>
        </div>
    </nav>

    <main class="container">
        
        <article class="library-item">
            <p>VB6 UBound Function
The <code>UBound</code> function returns a Long containing the largest available subscript for the indicated dimension of an array.</p>
<h2 id="syntax">Syntax</h2>
<pre><code class="language-vbnet">UBound(arrayname[, dimension])</code></pre>
<h2 id="parameters">Parameters</h2>
<ul>
<li><code>arrayname</code>: Required. Name of the array variable. Follows standard Visual Basic naming conventions.</li>
<li><code>dimension</code>: Optional. Variant (Long). Specifies which dimension's upper bound is returned. Use 1 for the first dimension, 2 for the second, and so on. If <code>dimension</code> is omitted, 1 is assumed.</li>
</ul>
<h2 id="returns">Returns</h2>
<p>Returns a <code>Long</code> containing the largest available subscript for the specified dimension of the array.</p>
<h2 id="remarks">Remarks</h2>
<p>The <code>UBound</code> function is used to determine the upper limit of an array dimension:
- <strong>Dimension parameter</strong>: If omitted, defaults to 1 (first dimension)
- <strong>Multi-dimensional arrays</strong>: Use <code>dimension</code> parameter to specify which dimension
- <strong>Zero-based arrays</strong>: <code>UBound</code> returns the upper index regardless of lower bound
- <strong>Paired with <code>LBound</code></strong>: Use <code>LBound</code> to get the lower bound
- <strong>Array size calculation</strong>: Size = <code>UBound - LBound + 1</code>
- <strong>Dynamic arrays</strong>: Returns current upper bound (changes with <code>ReDim</code>)
- <strong>Fixed arrays</strong>: Returns the declared upper bound
- <strong>Error on uninitialized</strong>: Error 9 (Subscript out of range) if array not initialized
- <strong><code>ParamArray</code></strong>: Works with <code>ParamArray</code> arguments to find number of elements</p>
<h3 id="common-array-declarations">Common Array Declarations</h3>
<pre><code class="language-vbnet">Dim arr(5)              &#x27; LBound = 0, UBound = 5 (6 elements)
Dim arr(1 To 5)         &#x27; LBound = 1, UBound = 5 (5 elements)
Dim arr(10 To 20)       &#x27; LBound = 10, UBound = 20 (11 elements)
Dim arr(5, 3)           &#x27; First: 0-5, Second: 0-3
Dim arr(1 To 5, 1 To 3) &#x27; First: 1-5, Second: 1-3</code></pre>
<h3 id="option-base-impact">Option Base Impact</h3>
<p>The <code>Option Base</code> statement affects default lower bounds:
- <code>Option Base 0</code>: Default lower bound is 0 (default)
- <code>Option Base 1</code>: Default lower bound is 1
- Explicit bounds (e.g., <code>1 To 5</code>) override Option Base</p>
<h3 id="dynamic-arrays">Dynamic Arrays</h3>
<p>For dynamic arrays:
- Before <code>ReDim</code>: Error 9 if accessed
- After <code>ReDim</code>: Returns current upper bound
- <code>ReDim Preserve</code>: Can change upper bound while preserving data
- <code>Erase</code>: Makes array uninitialized again</p>
<h2 id="typical-uses">Typical Uses</h2>
<ol>
<li><strong>Loop Bounds</strong>: Iterate through all array elements</li>
<li><strong>Array Size</strong>: Calculate the number of elements in an array</li>
<li><strong>Validation</strong>: Check if an index is within valid range</li>
<li><strong>Dynamic Resizing</strong>: Determine current size before <code>ReDim</code></li>
<li><strong><code>ParamArray</code></strong>: Count variable number of arguments</li>
<li><strong>Array Copying</strong>: Determine target array size</li>
<li><strong>Search Operations</strong>: Set loop limits for array searches</li>
<li><strong>Multi-dimensional</strong>: Navigate complex array structures</li>
</ol>
<h2 id="basic-examples">Basic Examples</h2>
<h3 id="example-1-simple-array-iteration">Example 1: Simple Array Iteration</h3>
<pre><code class="language-vbnet">Dim values(10) As Integer
Dim i As Integer
For i = LBound(values) To UBound(values)
    values(i) = i * 2
Next i</code></pre>
<h3 id="example-2-calculate-array-size">Example 2: Calculate Array Size</h3>
<pre><code class="language-vbnet">Function GetArraySize(arr() As Variant) As Long
    GetArraySize = UBound(arr) - LBound(arr) + 1
End Function
&#x27; Usage:
Dim myArray(5 To 15) As String
Debug.Print GetArraySize(myArray) &#x27; Prints: 11</code></pre>
<h3 id="example-3-multi-dimensional-array">Example 3: Multi-Dimensional Array</h3>
<pre><code class="language-vbnet">Sub ProcessMatrix()
    Dim matrix(1 To 3, 1 To 4) As Double
    Dim row As Integer
    Dim col As Integer
    For row = LBound(matrix, 1) To UBound(matrix, 1)
        For col = LBound(matrix, 2) To UBound(matrix, 2)
            matrix(row, col) = row * col
        Next col
    Next row
End Sub</code></pre>
<h3 id="example-4-paramarray-with-ubound">Example 4: <code>ParamArray</code> with <code>UBound</code></h3>
<pre><code class="language-vbnet">Function Sum(ParamArray values() As Variant) As Double
    Dim i As Integer
    Dim total As Double
    total = 0
    For i = LBound(values) To UBound(values)
        total = total + values(i)
    Next i
    Sum = total
End Function
&#x27; Usage: result = Sum(1, 2, 3, 4, 5)</code></pre>
<h2 id="common-patterns">Common Patterns</h2>
<h3 id="pattern-1-safe-array-iteration">Pattern 1: Safe Array Iteration</h3>
<pre><code class="language-vbnet">Sub IterateArray(arr() As Variant)
    Dim i As Long
    For i = LBound(arr) To UBound(arr)
        Debug.Print arr(i)
    Next i
End Sub</code></pre>
<h3 id="pattern-2-check-if-array-is-empty">Pattern 2: Check If Array Is Empty</h3>
<pre><code class="language-vbnet">Function IsArrayEmpty(arr() As Variant) As Boolean
    On Error Resume Next
    IsArrayEmpty = (UBound(arr) &lt; LBound(arr))
    If Err.Number &lt;&gt; 0 Then IsArrayEmpty = True
End Function</code></pre>
<h3 id="pattern-3-resize-array-with-data-preservation">Pattern 3: Resize Array with Data Preservation</h3>
<pre><code class="language-vbnet">Sub AddArrayElement(arr() As Variant, newValue As Variant)
    Dim newSize As Long
    On Error Resume Next
    newSize = UBound(arr) + 1
    If Err.Number &lt;&gt; 0 Then
        &#x27; Array not initialized
        ReDim arr(0 To 0)
        newSize = 0
    Else
        ReDim Preserve arr(LBound(arr) To newSize)
    End If
    arr(newSize) = newValue
End Sub</code></pre>
<h3 id="pattern-4-count-elements-in-paramarray">Pattern 4: Count Elements in <code>ParamArray</code></h3>
<pre><code class="language-vbnet">Function CountArgs(ParamArray args() As Variant) As Long
    On Error Resume Next
    CountArgs = UBound(args) - LBound(args) + 1
    If Err.Number &lt;&gt; 0 Then CountArgs = 0
End Function</code></pre>
<h3 id="pattern-5-validate-array-index">Pattern 5: Validate Array Index</h3>
<pre><code class="language-vbnet">Function IsValidIndex(arr() As Variant, index As Long) As Boolean
    On Error Resume Next
    IsValidIndex = (index &gt;= LBound(arr) And index &lt;= UBound(arr))
    If Err.Number &lt;&gt; 0 Then IsValidIndex = False
End Function</code></pre>
<h3 id="pattern-6-copy-array">Pattern 6: Copy Array</h3>
<pre><code class="language-vbnet">Function CopyArray(source() As Variant) As Variant()
    Dim dest() As Variant
    Dim i As Long
    ReDim dest(LBound(source) To UBound(source))
    For i = LBound(source) To UBound(source)
        dest(i) = source(i)
    Next i
    CopyArray = dest
End Function</code></pre>
<h3 id="pattern-7-reverse-array">Pattern 7: Reverse Array</h3>
<pre><code class="language-vbnet">Sub ReverseArray(arr() As Variant)
    Dim i As Long
    Dim j As Long
    Dim temp As Variant
    i = LBound(arr)
    j = UBound(arr)
    While i &lt; j
        temp = arr(i)
        arr(i) = arr(j)
        arr(j) = temp
        i = i + 1
        j = j - 1
    Wend
End Sub</code></pre>
<h3 id="pattern-8-find-last-element">Pattern 8: Find Last Element</h3>
<pre><code class="language-vbnet">Function GetLastElement(arr() As Variant) As Variant
    GetLastElement = arr(UBound(arr))
End Function</code></pre>
<h3 id="pattern-9-remove-last-element">Pattern 9: Remove Last Element</h3>
<pre><code class="language-vbnet">Sub RemoveLastElement(arr() As Variant)
    Dim newUpper As Long
    newUpper = UBound(arr) - 1
    If newUpper &gt;= LBound(arr) Then
        ReDim Preserve arr(LBound(arr) To newUpper)
    End If
End Sub</code></pre>
<h3 id="pattern-10-multi-dimensional-size">Pattern 10: Multi-Dimensional Size</h3>
<pre><code class="language-vbnet">Function GetArrayDimensions(arr As Variant) As Integer
    Dim dimension As Integer
    On Error Resume Next
    dimension = 1
    Do While Err.Number = 0
        Dim test As Long
        test = UBound(arr, dimension)
        dimension = dimension + 1
    Loop
    GetArrayDimensions = dimension - 1
End Function</code></pre>
<h2 id="advanced-usage">Advanced Usage</h2>
<h3 id="example-1-dynamic-array-manager-class">Example 1: Dynamic Array Manager Class</h3>
<pre><code class="language-vbnet">&#x27; Class: DynamicArrayManager
&#x27; Manages a dynamic array with automatic resizing
Option Explicit
Private m_Data() As Variant
Private m_Initialized As Boolean
Public Sub Initialize(Optional initialSize As Long = 10)
    ReDim m_Data(0 To initialSize - 1)
    m_Initialized = True
End Sub
Public Sub Add(value As Variant)
    Dim newIndex As Long
    If Not m_Initialized Then
        Initialize
        newIndex = 0
    Else
        newIndex = UBound(m_Data) + 1
        ReDim Preserve m_Data(0 To newIndex)
    End If
    m_Data(newIndex) = value
End Sub
Public Function GetItem(index As Long) As Variant
    If index &lt; LBound(m_Data) Or index &gt; UBound(m_Data) Then
        Err.Raise 9, , &quot;Index out of range&quot;
    End If
    If IsObject(m_Data(index)) Then
        Set GetItem = m_Data(index)
    Else
        GetItem = m_Data(index)
    End If
End Function
Public Sub SetItem(index As Long, value As Variant)
    If index &lt; LBound(m_Data) Or index &gt; UBound(m_Data) Then
        Err.Raise 9, , &quot;Index out of range&quot;
    End If
    m_Data(index) = value
End Sub
Public Function Count() As Long
    If Not m_Initialized Then
        Count = 0
    Else
        Count = UBound(m_Data) - LBound(m_Data) + 1
    End If
End Function
Public Sub Clear()
    If m_Initialized Then
        Erase m_Data
        m_Initialized = False
    End If
End Sub
Public Function ToArray() As Variant()
    ToArray = m_Data
End Function</code></pre>
<h3 id="example-2-array-utilities-module">Example 2: Array Utilities Module</h3>
<pre><code class="language-vbnet">&#x27; Module: ArrayUtilities
&#x27; Comprehensive array manipulation utilities
Option Explicit
Public Function ArraySize(arr As Variant) As Long
    On Error Resume Next
    ArraySize = UBound(arr) - LBound(arr) + 1
    If Err.Number &lt;&gt; 0 Then ArraySize = 0
End Function
Public Function ArrayContains(arr() As Variant, value As Variant) As Boolean
    Dim i As Long
    ArrayContains = False
    For i = LBound(arr) To UBound(arr)
        If arr(i) = value Then
            ArrayContains = True
            Exit Function
        End If
    Next i
End Function
Public Function ArrayIndexOf(arr() As Variant, value As Variant) As Long
    Dim i As Long
    ArrayIndexOf = -1
    For i = LBound(arr) To UBound(arr)
        If arr(i) = value Then
            ArrayIndexOf = i
            Exit Function
        End If
    Next i
End Function
Public Sub ArraySort(arr() As Variant)
    Dim i As Long
    Dim j As Long
    Dim temp As Variant
    For i = LBound(arr) To UBound(arr) - 1
        For j = i + 1 To UBound(arr)
            If arr(i) &gt; arr(j) Then
                temp = arr(i)
                arr(i) = arr(j)
                arr(j) = temp
            End If
        Next j
    Next i
End Sub
Public Function ArrayFilter(arr() As Variant, filterValue As Variant) As Variant()
    Dim result() As Variant
    Dim i As Long
    Dim count As Long
    count = 0
    For i = LBound(arr) To UBound(arr)
        If arr(i) &lt;&gt; filterValue Then
            ReDim Preserve result(0 To count)
            result(count) = arr(i)
            count = count + 1
        End If
    Next i
    ArrayFilter = result
End Function
Public Function ArraySlice(arr() As Variant, startIndex As Long, _
                          endIndex As Long) As Variant()
    Dim result() As Variant
    Dim i As Long
    Dim idx As Long
    ReDim result(0 To endIndex - startIndex)
    idx = 0
    For i = startIndex To endIndex
        result(idx) = arr(i)
        idx = idx + 1
    Next i
    ArraySlice = result
End Function</code></pre>
<h3 id="example-3-matrix-operations-class">Example 3: Matrix Operations Class</h3>
<pre><code class="language-vbnet">&#x27; Class: MatrixOperations
&#x27; Performs operations on 2D arrays
Option Explicit
Public Function GetRowCount(matrix As Variant) As Long
    On Error Resume Next
    GetRowCount = UBound(matrix, 1) - LBound(matrix, 1) + 1
    If Err.Number &lt;&gt; 0 Then GetRowCount = 0
End Function
Public Function GetColumnCount(matrix As Variant) As Long
    On Error Resume Next
    GetColumnCount = UBound(matrix, 2) - LBound(matrix, 2) + 1
    If Err.Number &lt;&gt; 0 Then GetColumnCount = 0
End Function
Public Function GetRow(matrix As Variant, rowIndex As Long) As Variant()
    Dim result() As Variant
    Dim col As Long
    Dim idx As Long
    ReDim result(LBound(matrix, 2) To UBound(matrix, 2))
    For col = LBound(matrix, 2) To UBound(matrix, 2)
        result(col) = matrix(rowIndex, col)
    Next col
    GetRow = result
End Function
Public Function GetColumn(matrix As Variant, colIndex As Long) As Variant()
    Dim result() As Variant
    Dim row As Long
    ReDim result(LBound(matrix, 1) To UBound(matrix, 1))
    For row = LBound(matrix, 1) To UBound(matrix, 1)
        result(row) = matrix(row, colIndex)
    Next row
    GetColumn = result
End Function
Public Function TransposeMatrix(matrix As Variant) As Variant
    Dim result() As Variant
    Dim row As Long
    Dim col As Long
    ReDim result(LBound(matrix, 2) To UBound(matrix, 2), _
                 LBound(matrix, 1) To UBound(matrix, 1))
    For row = LBound(matrix, 1) To UBound(matrix, 1)
        For col = LBound(matrix, 2) To UBound(matrix, 2)
            result(col, row) = matrix(row, col)
        Next col
    Next row
    TransposeMatrix = result
End Function</code></pre>
<h3 id="example-4-collection-to-array-converter">Example 4: Collection to Array Converter</h3>
<pre><code class="language-vbnet">&#x27; Module: CollectionConverter
&#x27; Converts between Collections and Arrays
Option Explicit
Public Function CollectionToArray(col As Collection) As Variant()
    Dim result() As Variant
    Dim i As Long
    If col.Count = 0 Then
        CollectionToArray = Array()
        Exit Function
    End If
    ReDim result(1 To col.Count)
    For i = 1 To col.Count
        If IsObject(col(i)) Then
            Set result(i) = col(i)
        Else
            result(i) = col(i)
        End If
    Next i
    CollectionToArray = result
End Function
Public Function ArrayToCollection(arr() As Variant) As Collection
    Dim result As New Collection
    Dim i As Long
    For i = LBound(arr) To UBound(arr)
        result.Add arr(i)
    Next i
    Set ArrayToCollection = result
End Function
Public Function MergeArrays(ParamArray arrays() As Variant) As Variant()
    Dim result() As Variant
    Dim totalSize As Long
    Dim currentIndex As Long
    Dim i As Long
    Dim j As Long
    Dim arr As Variant
    &#x27; Calculate total size
    totalSize = 0
    For i = LBound(arrays) To UBound(arrays)
        arr = arrays(i)
        totalSize = totalSize + (UBound(arr) - LBound(arr) + 1)
    Next i
    &#x27; Merge arrays
    ReDim result(0 To totalSize - 1)
    currentIndex = 0
    For i = LBound(arrays) To UBound(arrays)
        arr = arrays(i)
        For j = LBound(arr) To UBound(arr)
            result(currentIndex) = arr(j)
            currentIndex = currentIndex + 1
        Next j
    Next i
    MergeArrays = result
End Function</code></pre>
<h2 id="error-handling">Error Handling</h2>
<p>The <code>UBound</code> function can raise the following errors:
- <strong>Error 9 (Subscript out of range)</strong>: If the array has not been initialized (for dynamic arrays)
- <strong>Error 9 (Subscript out of range)</strong>: If <code>dimension</code> is less than 1 or greater than the array's number of dimensions
- <strong>Error 13 (Type mismatch)</strong>: If the variable is not an array
- <strong>Error 5 (Invalid procedure call or argument)</strong>: If dimension parameter is invalid</p>
<h2 id="performance-notes">Performance Notes</h2>
<ul>
<li>Very fast O(1) operation - directly returns array metadata</li>
<li>No performance difference between dimensions</li>
<li>Safe to call repeatedly in loops</li>
<li>Consider caching value if used extensively in tight loops</li>
<li>No memory allocation or copying involved</li>
</ul>
<h2 id="best-practices">Best Practices</h2>
<ol>
<li><strong>Always use with <code>LBound</code></strong> for complete array bounds information</li>
<li><strong>Check for initialization</strong> with On Error Resume Next for dynamic arrays</li>
<li><strong>Use in For loops</strong> instead of hardcoding array sizes</li>
<li><strong>Specify dimension</strong> explicitly for multi-dimensional arrays</li>
<li><strong>Cache in variables</strong> if used multiple times in tight loops</li>
<li><strong>Validate dimension parameter</strong> when working with multi-dimensional arrays</li>
<li><strong>Handle errors gracefully</strong> for potentially uninitialized arrays</li>
<li><strong>Use for <code>ParamArray</code></strong> to handle variable arguments</li>
<li><strong>Document array bounds</strong> in function comments</li>
<li><strong>Prefer explicit bounds</strong> in array declarations for clarity</li>
</ol>
<h2 id="comparison-table">Comparison Table</h2>
<table>
<thead>
<tr>
<th>Function</th>
<th>Purpose</th>
<th>Returns</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>UBound</code></td>
<td>Upper bound</td>
<td>Long</td>
<td>Largest valid index</td>
</tr>
<tr>
<td><code>LBound</code></td>
<td>Lower bound</td>
<td>Long</td>
<td>Smallest valid index</td>
</tr>
<tr>
<td><code>Array</code></td>
<td>Create array</td>
<td>Variant</td>
<td>Returns zero-based array</td>
</tr>
<tr>
<td><code>ReDim</code></td>
<td>Resize array</td>
<td>N/A</td>
<td>Statement, not function</td>
</tr>
</tbody>
</table>
<h2 id="platform-notes">Platform Notes</h2>
<ul>
<li>Available in VB6, VBA, and <code>VBScript</code></li>
<li>Behavior consistent across platforms</li>
<li>Returns Long (32-bit signed integer)</li>
<li>Maximum array size limited by available memory</li>
<li>Multi-dimensional arrays limited to 60 dimensions</li>
</ul>
<h2 id="limitations">Limitations</h2>
<ul>
<li>Cannot determine if array is initialized without error handling</li>
<li>Does not return array capacity (allocated size vs. used size)</li>
<li>No built-in way to get all dimensions at once</li>
<li>Dimension parameter must be compile-time constant in some contexts</li>
<li>Cannot be used on Collections or other non-array types</li>
<li>Does not work with jagged arrays (arrays of arrays) directly</li>
</ul>
        </article>
        
        <div style="margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border-color);">
            <p>
                <a href="index.html">← Back to Arrays</a> |
                <a href="../index.html">View all functions</a>
            </p>
        </div>

    </main>

    <footer>
        <div class="container">
            <p>&copy; 2024-2026 VB6Parse Contributors. Licensed under the MIT License.</p>
        </div>
    </footer>
</body>
</html>