The best magazine
Define Ordinal Visual Basic 6
- Defining a Visual Basic array with ordinals only takes one line of code. For instance, the following code creates an array with 10 ordinals:
Dim myarray(10) As Integer
The variable name is "myarray" and 10 ordinals exist in the array. This means you can store 10 integers to the "myarray" variable. - When you create an array, you must be sure that you define enough ordinals. If you attempt to save a value to a non-existent ordinal, you receive a compiler error, which is shown to your user and crashes your program.
- Each array is defined with a specific type. It is also important to define the right array type. For instance, defining an array variable as an integer requires you to save only integer numbers in the array variable.