Autor Beitrag
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 01.04.06 12:39 
Hallo;

ich habe folgendes deklariert:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
type
TSpieler=(cpu,spieler1,spieler2);

var feldzeichen : array[1..42] of TSpieler;

Dann kann ich z.B. folgendes machen:
ausblenden Delphi-Quelltext
1:
feldzeichen[1]:=cpu;					

Ich will nun aber z.B. feldzeichen[1] sozusagen wieder leeren. Es soll also keinen der drei Werte annehmen. Muss ich das dann so schreiben:
ausblenden Delphi-Quelltext
1:
feldzeichen[1]:=nil;					

Bitte um schneller Hilfe ;)

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Sa 01.04.06 12:42 
Ergänze deinen Typ dann einfach um einen weiteren Wert "keins" (sollte als erster drin stehen) und weise diesen standardmäßig zu.

Anders wirst Du das nicht sinnvoll hinbekommen.

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Marco D. Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Sa 01.04.06 12:46 
Jo danke

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot