Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about _MEM blocks and arrays
#16
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.  Sad

[Image: Recordarray2025-06-06.jpg]
Reply


Messages In This Thread
RE: Question about _MEM blocks and arrays - by Kernelpanic - 06-06-2025, 07:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _Putimage Question. Pete 11 704 01-04-2026, 09:33 PM
Last Post: Pete
  Nice simple, I hope, question Mad Axeman 4 360 12-20-2025, 09:28 PM
Last Post: SMcNeill
Question Experimenting with a "StringList" type for simpler handling of string arrays/lists Heimdall 18 1,226 12-19-2025, 12:51 PM
Last Post: Heimdall
  NewBie Question niteflyer 2 345 11-06-2025, 07:11 PM
Last Post: Petr
  A Question About _MAPTRIANGLE Magdha 2 388 11-02-2025, 11:37 AM
Last Post: Magdha

Forum Jump:


Users browsing this thread: 1 Guest(s)