IT SOLUTIONS
Your full service technology partner! 
-Collapse +Expand
To/From Code
-Collapse +Expand Cross Ref Guide
-Collapse +Expand Members-Only
Sign in to see member-only pages.
   ► KBTo/From GuidesVB ClassicLanguage Details  Print This     

Array (Cross Ref > Language Details)

By Mike Prestwood

VB Classic versus C++/CLI: A side by side comparison between VB Classic and C++/CLI.

 
Data Structures
 

Data structures allow you to store and work with data. Common data structures include arrays, associative arrays, etc.

Array

[Other Languages] 

Languages Focus

A data structure in which individual values (called elements or items) may be located by reference to one or more integer index variables, the number of such indices being the number of dimensions in the array.

Arrays can start with an index value of 0 or 1, sometimes referred to as 0 based or 1 based.

VB Classic:   x = Array()

Arrays in VB Classic use a 0-based indice. Use UBound to get the number of elements. UBound returns -1 if the array has no elements, 0 if it has 1, 1 if it has 2, etc.

Syntax Example:  
Dim MyArray As Variant
Dim i As Integer
 
MyArray = Array("Mike", "Lisa", "Felicia", "Nathan")
 
If UBound(MyArray) > -1 Then
  For i = 0 To UBound(MyArray)
    MsgBox (MyArray(i))
  Next
End If
[Not specified yet. Coming...]












Go ahead!   Use Us! Call: 916-726-5675  Or visit our new sales site: 
www.prestwood.com


©1995-2024 Prestwood IT Solutions.   [Security & Privacy]