Einzelnen Beitrag anzeigen

Benutzerbild von implementation
implementation

Registriert seit: 5. Mai 2008
940 Beiträge
 
FreePascal / Lazarus
 
#3

Re: " Chat-Roboter " der antwortet

  Alt 21. Sep 2009, 17:18
hmmm...
Delphi-Quellcode:
type TAntwortrecord = record
  Eingabe,Antwort: string;
end;
type TAntwortSpeicher = Array of TAnswerrecord;

var Aw: TAntwortspeicher;

[...]

function GetAnswer(Eingabe: string): string;
var i: byte;
begin
  for i := 0 to Length(aw) do if aw[i].Eingabe=Eingabe then Result := aw[i].Antwort;
end;
Marvin
  Mit Zitat antworten Zitat