Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
20. Feb 2010
Wie sieht denn deine Speicherverwaltung aus?
Bzw, wenn du auf reale SETs zugreifen willst, dann bleibt dann eh kein anderer Weg
abfragen:
if count <= 8 then result := ($1 shl value) and PByte(@data) <> 0
else if count <= 16 then result := ($1 shl value) and PWord(@data) <> 0
else result := ($1 shl (value mod 32)) and PLongWord(@data) <> 0;
//result := ($1 shl (value and 31)) and...
Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
20. Feb 2010
1-8 = 1 Byte
9-16 = 2 Byte (Word)
17-32 = 4 Byte (LongWord)
33-64 = 8 Byte (UInt64)
und dann jeweils in 4 Byte-Schritten (glaub ich) bis 32 Byte = maximale 256 Werte
Forum: Object-Pascal / Delphi-Language
Delphi
by himitsu,
20. Feb 2010
Bei Sets mit vorfefinierten werten, sowie bei Integersets, ist es nicht so eindeutig,
aber im Allgemeinen:
type e = (a, b, c, d);
s = set of e;
// oder
type s = set of (a, b, c, d);