BUS4 092 Lecture Notes - Lecture 8: Splash Screen
Document Summary
Agenda: arrays, multidimensional arrays, timer, splash screens, random numbers: arrays: groups of variables that allow you to store sets of data. All the values stored within an array are called elements, and are all of same data type. You can access individual elements in an array through a subscript: declaring an array: dim arrayname (uppersubscript) as datatype e. g. dim studentgrades (40) as integer. This creates an array with 41 elements (0-40). Implicit array sizing and initialization: e. g. dim studentgrades () as integer = { 20, 40, 60, This declares an array of size (4) and uppersubscript (3: working with array elements, to initialize an array: studentgrades (0) = 20 studentgrades(1)=40 studentgrades (40)=90, use in expressions: use arrays as you would use normal variables. For intcount = 0 to 9 studentgrade (intcount) = intcount *20. Next: array bound checking: if you try to use arrays outside the bounds, it will cause a runtime error, accessing array elements, using for each loop.