Autor Beitrag
jeng
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Mi 07.10.15 18:50 
Hallo,


Wie kann ich in dieses array ein char einbinden?
Habs mal so hingeschrieben wie ich das bräuchte. (geht natürlich nicht)

ausblenden Delphi-Quelltext
1:
TestArray: array [0 .. 15, char, 0 .. 7of Boolean;					



Geht das überhaupt? Oder gibt es eine andere Lösung?

Danke.
Mathematiker
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2622
Erhaltene Danke: 1447

Win 7, 8.1, 10
Delphi 5, 7, 10.1
BeitragVerfasst: Mi 07.10.15 18:58 
Wenn ich dich richtig verstehe, z.B. so
ausblenden Delphi-Quelltext
1:
2:
type TFeld = record c:char; b:boolean end;
var  TestArray: array [0 .. 150 .. 7of TFeld;

Beste Grüße
Mathematiker

_________________
Töten im Krieg ist nach meiner Auffassung um nichts besser als gewöhnlicher Mord. Albert Einstein

Für diesen Beitrag haben gedankt: jeng
jeng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Mi 07.10.15 19:39 
user profile iconMathematiker hat folgendes geschrieben Zum zitierten Posting springen:
Wenn ich dich richtig verstehe, z.B. so
ausblenden Delphi-Quelltext
1:
2:
type TFeld = record c:char; b:boolean end;
var  TestArray: array [0 .. 150 .. 7of TFeld;

Beste Grüße
Mathematiker


Yes, das wars was ich gesuch hab.

Vielen Dank!
jeng Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 30



BeitragVerfasst: Do 08.10.15 09:35 
[quote="[user]jeng[/user]"(696310)]
user profile iconMathematiker hat folgendes geschrieben Zum zitierten Posting springen:
Wenn ich dich richtig verstehe, z.B. so
ausblenden Delphi-Quelltext
1:
2:
type TFeld = record c:char; b:boolean end;
var  TestArray: array [0 .. 150 .. 7of TFeld;

Beste Grüße
Mathematiker


Das ist also genau das was ich gesucht habe.

Nur ein verständnis problem,
Char kann ich zuweisen, das klapt. Aber wie Setze ich Sie dann auf True?

mfg
Nersgatt
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1581
Erhaltene Danke: 279


Delphi 10 Seattle Prof.
BeitragVerfasst: Do 08.10.15 09:40 
Du kannst auf die Felder des Records einfach zugreifen:

ausblenden Delphi-Quelltext
1:
2:
meinArray[0,0].c := 'x';
meinArray[0,0].b := True;

_________________
Gruß, Jens
Zuerst ignorieren sie dich, dann lachen sie über dich, dann bekämpfen sie dich und dann gewinnst du. (Mahatma Gandhi)

Für diesen Beitrag haben gedankt: jeng