1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| Function Defaut(ByVal Nb As Integer, ByVal Ag As Integer)
Dim A As Integer
A = 0
Dim testAg() As Integer = {23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40}
Dim testTaille() As Double = {32, 33, 34, 35, 36, 37, 39, 40, 42, 43, 45, 46, 47, 47.5, 49.8, 50.5, 51, 51.9}
Dim testPoids() As Integer = {750, 800, 890, 897, 1100, 1200, 1300, 1500, 1690, 1850, 2050, 2250, 2500, 2700, 2900, 3150, 3300, 3450}
Do While testAg(A) <> Ag & A <> testAg.Length - 1
A = A + 1
Loop
Select Case (Nb)
Case 1
Return (testTaille(A))
Case 2
Return (testPoids(A))
End Select
Return 0
End Function |
Partager