Einzelnen Beitrag anzeigen

EMS

Registriert seit: 19. Dez 2012
97 Beiträge
 
#1

Bekomm das mit den Records nicht hin?

  Alt 19. Dez 2012, 08:50
Hallo
Ich möchte ein Programm zum CD suchen ect. schreiben.
Das gerne mit dem Record cdtyp.
Jetzt bin ich mir aber nicht ganz sicher wo ich das genau rein schreiben muss?
Ich habe mal den bisherigen Quelltext unten drunter gestellt.
Wenn ich es jetzt starten will kommt immer:

Identifier not found "cdtyp"
Error in type definition
Identifier not found "cdtyp"

Ich hab keine Idee wieso?
Ich vermute ich habe das type irgendwie nicht ganz richtig da drinne Stehen??




unit Unit1;

{$mode objfpc}{$H+}

interface

uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;

type

{ TForm1 }

TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }

type cdtyp = record
Interpret: string[20];
Titel:string[40];
Musikrichtung:string[20];
Spieldauer: integer;
Jahr: integer;
end;
end;


var
Form1: TForm1;
cd: array[1..100] of cdtyp;
wahl : byte;
index : integer;
datei : file of cdtyp;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
index:=strtoint(Edit1.text);
end;

end.
  Mit Zitat antworten Zitat