Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Arrays/VBA/arrays-1.vba
Normal file
1
Task/Arrays/VBA/arrays-1.vba
Normal file
|
|
@ -0,0 +1 @@
|
|||
Option Base {0|1}
|
||||
29
Task/Arrays/VBA/arrays-2.vba
Normal file
29
Task/Arrays/VBA/arrays-2.vba
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
Sub matrix()
|
||||
'create an array,
|
||||
Dim a(3) As Integer
|
||||
Dim i As Integer
|
||||
'assign a value to it,
|
||||
For i = 1 To 3
|
||||
a(i) = i * i
|
||||
Next i
|
||||
'and retrieve an element
|
||||
For i = 1 To 3
|
||||
Debug.Print a(i)
|
||||
Next i
|
||||
'dynamic
|
||||
Dim d() As Integer
|
||||
ReDim d(3)
|
||||
For i = 1 To 3
|
||||
d(i) = i * i
|
||||
Next i
|
||||
'and retrieve an element
|
||||
For i = 1 To 3
|
||||
Debug.Print d(i)
|
||||
Next i
|
||||
'push a value to it - expand the array and preserve existing values
|
||||
ReDim Preserve d(4)
|
||||
d(4) = 16:
|
||||
For i = 1 To 4
|
||||
Debug.Print d(i)
|
||||
Next i
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue