moin,
jemand ne ahnung was hieran falsch ist?
Delphi-Quellcode:
...
TChannel = record
name: string;
topic: string;
end;
TChannels = array[0..4] of TChannel;
var
Channels: TChannels;
...
function ChannelByName(channel: string): TChannel;
var
i: integer;
begin
for i := low(channels) to high(channels) do
if channels[i].name = channel then
result := channels[i];
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Channels[0].name := '#test';
ChannelByName('#test').topic := 'hi'; // hier der fehler
showmessage(ChannelByName('#test').topic);
end;
...