How I can fix my Code example with a SUB Array() ?
Code: Select all
' test code for array
Dim As Integer A(),B(),C(),X()
ReDim A(1 To 4),B(1 To 4),C(1 To 4), X(1 To 4)
redim preserve A(1 to 10), B(1 To 10), C(1 To 8), X(1 To 10)
print lbound(a), ubound(a)
print lbound(b), UBound(b)
print lbound(c), UBound(c)
print lbound(x), ubound(x)
Sub GaussianElimination( A() As Single, B() As Single, X() As Single)
' test code
For i as integer = lbound(A) to ubound(A)
A(i) = i
Next
For i as Integer = lbound(B) to ubound(B)
B(i) = i
Next
For i as Integer = lbound(X) to ubound(X)
X(i) = i
Next
End Sub
' error 58, type mismatch at parameter 1 (A)
'Print GaussianElimination(A(), B(), X() )
sleep