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.
![[Image: Record-Array2024-07-01.jpg]](https://i.ibb.co/HP0xg2s/Record-Array2024-07-01.jpg)
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
![[Image: Record-Array2024-07-01.jpg]](https://i.ibb.co/HP0xg2s/Record-Array2024-07-01.jpg)
Does anyone know where the error is? Thanks!