07-01-2024, 08:34 PM
So, using arrays as record elements is not possible in QB. OK, but declaring record arrays is also possible in QB.
I've tried this according to the QBasic manual, only a rudimentary guide, but something isn't working. The program runs without errors, but there is no meaningful output. I'm thinking wrong.
Does anyone know where the error is? Thanks!
I've tried this according to the QBasic manual, only a rudimentary guide, but something isn't working. The program runs without errors, but there is no meaningful output. I'm thinking wrong.
Code: (Select All)
Type Motorrad
Modell As String * 30
Kilowatt As Double
Preis As Double
End Type
Dim MotorradMarken(2) As Motorrad
Dim As Integer anzahl, satzNummer
satzNummer = 1
Do
Input "Modell : ", Motorrad.Modell
Input "Kilowatt : ", Motorrad.Kilowatt
Input "Preis : ", Motorrad.Preis
satzNummer = satzNummer + 1
Loop Until satzNummer = 2
For anzahl = 1 To satzNummer
Print MotorradMarken(anzahl).Modell
Print MotorradMarken(anzahl).Kilowatt
Print MotorradMarken(anzahl).Preis
Next
Does anyone know where the error is? Thanks!