fb:porticula NoPaste
Noch ein Array-Beispiel
Uploader: | Sebastian |
Datum/Zeit: | 13.11.2011 15:28:02 |
Declare Sub GibKompletteNamenAus (Vornamen() As String, Nachnamen() As String)
Dim As String Vornamen(10 To 13) = { "Max", "Baerbel", "Petra", "Homer" }
Dim As String Nachnamen(1 To 4) = { "Muster", "Basic", "Probe", "Simpson" }
GibKompletteNamenAus (Vornamen(), Nachnamen())
Sleep
End
Sub GibKompletteNamenAus (Vornamen() As String, Nachnamen() As String)
Dim As Integer i = LBound(Vornamen), j = LBound(Nachnamen)
If ((UBound(Vornamen)-i) <> (UBound(Nachnamen)-j)) Then
Print "Fehler: Die beiden Arrays sind nicht gleich lang!"
Exit Sub
Else
While (i <= UBound(Vornamen))
Print Vornamen(i); " "; Nachnamen(j)
i += 1
j += 1
Wend
End If
End Sub