Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| vb.net [2018/02/23 09:51] – lenshand | vb.net [2020/09/18 13:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| [[Arrays and Select Case|Arrays and Select Case]] | [[Arrays and Select Case|Arrays and Select Case]] | ||
| + | |||
| + | Arrays allow you to store a range of items of the same datatype. an array is a variable with a single name that represents many different items. When we work with a single item, we only need to use one variable. However, if we have a list of items which are of similar type to deal with, we need to declare an array of variables for each item. | ||
| + | |||
| + | An array can be one-dimensional or multidimensional. A one-dimensional array is like a list of items or a table that consists of one row of items or one column of items. | ||
| + | |||
| + | ^Names^ | ||
| + | |Peter|Paul|James|Suzie| | ||
| + | |index(0)|index(1)|index(2)|index(3)| | ||
| + | |||
| + | Declaring one dimensional Array | ||
| + | |||
| + | The general syntax to declare a one dimensional array is as follows: | ||
| + | |||
| + | < | ||
| + | Dim arrayName(subscript) as dataType | ||
| + | </ | ||
| + | |||
| + | ==== Week commencing 23 April 2018 ==== | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | {{ : | ||
| + | |||