Wednesday, May 27, 2009

Example declares an array that consists of the first element

Example
Dim Count(100 to 500) as Integer

declares an array that consists of the first element starting from Count(100) and ends at Count(500)
The general format to declare a two dimensional array is as follow:

Dim ArrayName(Sub1,Sub2) as dataType

Example

Dim StudentName(10,10) will declare a 10x10 table make up of 100 students' Names, starting with StudentName(1,1) and end with StudentName(10,10).

No comments:

Post a Comment