06-06-2025, 07:07 PM
(This post was last modified: 06-06-2025, 08:45 PM by Kernelpanic.)
Quote:@FCS_coder - I was led to that by the info that you can't (shouldn't?) use arrays in UDTs.That is true, but you can use record arrays. Maybe this is a possibility.
PS: Bug fixed. But the loop isn't perfect yet.
Code: (Select All)
'Recordfeld, Hinweis S. 45 und S. 173 - 6. Juni 2025
Option _Explicit
Type Motorrad
Modell As String * 30
Kilowatt As Double
Preis As Double
End Type
Dim MotorradMarken(2) As Motorrad
Dim As Integer anzahl, satzNummer, zeile, spalte
satzNummer = 1
zeile = 3: spalte = 3
Locate zeile, spalte
Do
Input "Modell : ", MotorradMarken(satzNummer).Modell
Locate CsrLin, spalte
Input "Kilowatt : ", MotorradMarken(satzNummer).Kilowatt
Locate CsrLin, spalte
Input "Preis : ", MotorradMarken(satzNummer).Preis
satzNummer = satzNummer + 1
Loop Until satzNummer <= 2
Locate CsrLin + 2, spalte
For anzahl = 1 To satzNummer
'Sa muss ein Semikolon hin, sonst langer Abstand
Print Tab(4); "Modell : "; MotorradMarken(anzahl).Modell
Print Tab(4); Using "Kilowatt : #####.##"; MotorradMarken(anzahl).Kilowatt
Print Tab(4); Using "Preis : #####.##"; MotorradMarken(anzahl).Preis
Locate CsrLin + 1, spalte
Next
End
The loop doesn't work.

