Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
28. Mai 2010
Schon klar, daß der Datentyp angepaßt wird,
aber dennoch wird nur von Low( ) bis High( ) durchlaufen.
TMyEnum = (
atMapping, // Low(TMyEnum) = 0
atVisible,
atNotNull // Low(TMyEnum) = 2
);
Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
28. Mai 2010
Jupp (hatte ich ja auch schon gesagt ... Variable oder Konstante)
aber Achtung (wie ebenfalls erwähnt):
Hier wird die For-Schleife 10 Werte liefern und nicht nur 3.
type
TMyEnum = (
atMapping,
atVisible,
atNotNull = 9
);
Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
28. Mai 2010
Wie schon gesagt wurde: TRttiPropertyInfoAttributeTypesSet ist kein SET, sondern ebenfalls ein ENUM!
Es ist quasi nur sowas wie eine Kopie von TRttiPropertyInfoAttributeTypes.
(ein neuer Typ, mit dem selben Wertebereich)
TRttiPropertyInfoAttributeTypesSet =
Low(TRttiPropertyInfoAttributeTypes)..High(TRttiPropertyInfoAttributeTypes)];
// oder
TRttiPropertyInfoAttributeTypesSet =...
Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
28. Mai 2010
for AttributeType in TRttiPropertyInfoAttributeTypesSet do
Da gehört eine Variable oder Konstante und kein Typ hin.
IN durchläuft Speicherinhalte und keine Deklarationen.
for AttributeType = Low(TRttiPropertyInfoAttributeTypesSet) to High(TRttiPropertyInfoAttributeTypesSet) do
for AttributeType = Low(TRttiPropertyInfoAttributeTypes) to High(TRttiPropertyInfoAttributeTypes) do