Autor Beitrag
Visum
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Fr 13.09.02 10:29 
Hi,
wie groß kann ein Array maximal werden?

Und was macht ein Array ohne Größenangabe ( array of boolean ), weil damit läuft mein Programm nicht mehr?

mfG
Visum
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Fr 13.09.02 10:42 
Hi
Stichwort für die Online-Hilfe wäre Array Typen
Ein Array ohne Grössenangabe ist ein dynamisches Array.
Zitat aus der OnlineHilfe
Zitat:

var MyFlexibleArray: array of Real;

Diese Deklaration weist MyFlexibleArray keinen Speicherplatz zu. Um ein Array im Speicher anzulegen, rufen Sie SetLength auf. Ausgehend von der obigen Deklaration weist die folgende Zeile einem Array mit 20 reellen Zahlen und einem Index von 0 bis 19 Speicherplatz zu:

SetLength(MyFlexibleArray, 20);


Wenn du keine Grösse für dein Array zuweist, kanns auch net funktioneren. Grösse ist IMHO nur durch den Speicher begrenzt.

Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...