Autor Beitrag
fuulf
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Mo 23.11.09 20:32 
Hallo,


wenn ich ein Var <ArrayBezeichner>: Array of Array of <Typ> erstelle, sollte ich dann

<ArrayBezeichner>[<1. Index>][<2. Index>]

oder

<ArrayBezeichner>[<1. Index>, <2.Index>]

verwenden ?



Viele liebe Grüße


Moderiert von user profile iconNarses: Topic aus Sonstiges (Delphi) verschoben am Mo 23.11.2009 um 20:20


Zuletzt bearbeitet von fuulf am Mo 23.11.09 21:32, insgesamt 1-mal bearbeitet
Mitmischer 1703
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 754
Erhaltene Danke: 19

Win 7, Debian
Delphi Prism, Delphi 7, RAD Studio 2009 Academic, C#, C++, Java, HTML, PHP
BeitragVerfasst: Mo 23.11.09 20:46 
Ich glaube das Komma, bin mir aber nicht sicher :)

_________________
Die Lösung ist nicht siebzehn.
jfheins
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 918
Erhaltene Danke: 158

Win 10
VS 2013, VS2015
BeitragVerfasst: Mo 23.11.09 20:57 
Völlig egal, das macht keinen Unterschied (Ich tendiere aber eher zum Komma)

In .net macht es einen Unterschied - mit Komma ist das Feld immer rechteckig.
fuulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Mo 23.11.09 21:01 
Rechteckig heißt, dass jedes <ArrayBezeichner>[1. Index] gleich viele Elemente hat?
jfheins
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 918
Erhaltene Danke: 158

Win 10
VS 2013, VS2015
BeitragVerfasst: Mo 23.11.09 21:36 
Ja, genau. In .net gibt es da eine Unterscheidung (siehe hier: msdn.microsoft.com/d...9b9dty7d(VS.80).aspx )

Aber in Delphi Win32 gibt es diesen Unterschied nicht. (Im Grunde sind alles jagged-Arrays, aber meistens werden sie trotzdem rechteckig benutzt)
fuulf Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Mo 23.11.09 22:33 
Vielen vielen Dank :-)