To define an array, you first have to Dim it with relevant dimensions and sizes, and then you can load the data into where ever you want. You can't define an array in VB and assign values like you do in C-based languages, though.
Ok Lee
If i resume i can't do someting like that:
tst = array([1,2,3],[4,5,6])
Right!
I have to do:
dim tst(1,1)
tst(0,0) = 1
tst(1,0) = 2
tst(1,0) = 3
tst(1,1) = 4
Humm! not very flexible
Each language has its own features and failures. Initializing arrays is more difficult in VB than some of the other languages, but realistically, most arrays are populated by reading data from a file, which means using a loop and it's just as easy to do that with VB as with C.
Contrived examples like you showed are usually textbook-oriented, and not all that relevant to real life programming.
perhaps, there is also some thought / issue that Ms. A. is a DATABASE, so generally TABLES would be the repository of (for?) pre-initalized data organizations? Isn't a Table 'much like' and array (at least for the 2-D ones? Don't the N-D ones generally relate to Table RELATIONSHIPS / Joins? Mayhap one would consider placint the data in a set of tables with appropiate PK FK relationships and take advantage of the "strength" of the db?
Just random thinking. Perhaps a bit out of the box?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.