Ultimate Sidebar

Define Ordinal Visual Basic 6

104 1

    Defining

    • 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.

    Considerations

    • 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.

    Types

    • 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.

Source: ...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.