Autor Beitrag
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Mi 20.02.13 00:12 
Moderiert von user profile iconNarses: Abgetrennt von [url=www.entwickler-ecke....4#673534]hier[/url].

Noch eine kurze Frage:

Wie kann ich den "Set Of Byte" leeren?

_________________
Hasta La Victoria Siempre
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Mi 20.02.13 01:10 
ausblenden Delphi-Quelltext
1:
   ZeroMemory(@redItems,SizeOf(redItems));					

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
jfheins
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 918
Erhaltene Danke: 158

Win 10
VS 2013, VS2015
BeitragVerfasst: Mi 20.02.13 02:06 
Oder ohne zu pfuschen:

ausblenden Delphi-Quelltext
1:
MySet = [];					

Für diesen Beitrag haben gedankt: Martok
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 20.02.13 02:06 
@bummi: öh, ja, das könnte unter Umständen sogar funktionieren :gruebel:

Wie jeden anderen Set-Typen auch: Zuweisen der Leeren Menge.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
type
  TTest = set of byte;
var
  bts: TTest;
begin
  bts:= [1,2,3,4];
  Assert(4 in bts, 'Ausgangssituation');
  bts:= [];
  Assert(not(4 in bts), 'Jetzt isser leer');


€/@jfheins: Du hast gewonnen :mrgreen:

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
Terra23 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Mi 20.02.13 22:08 
Vielen Dank an jfheins für die Antwort. Nil und 0 und '' wollte nicht funktionieren; auf [] bin ich nicht gekommen.

Und vielen Dank an Narses fürs Trennen der Topics. Ordnung muss sein, was?

_________________
Hasta La Victoria Siempre