AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Habe ich Knöpfe auf den Augen - Please help

Ein Thema von JimmyB · begonnen am 17. Apr 2022 · letzter Beitrag vom 18. Apr 2022
 
JimmyB

Registriert seit: 20. Mär 2022
26 Beiträge
 
#1

Habe ich Knöpfe auf den Augen - Please help

  Alt 17. Apr 2022, 21:42
Hallo Leute,

ich werde wahnsinnig. Ein einfacher Code, aber bekomme einen Fehler und weiß nicht woran es liegt. Beim Starten kommt die Meldung bei 10.4
[dcc32 Fehler] Unit3.pas(53): E2003 Undeklarierter Bezeichner: 'redDisplay'
[dcc32 Fehler] Unit3.pas(53): E2066 Operator oder Semikolon fehlt
[dcc32 Fataler Fehler] Project2.dpr(5): F2063 Verwendete Unit 'Unit3.pas' kann nicht compiliert werden
Misslungen
Verstrichene Zeit: 00:00:00.5

vg JimmyB


unit Unit3;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ComCtrls;

type
TForm3 = class(TForm)
Button1: TButton;
Button2: TButton;
RichEdit1: TRichEdit;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;

var
Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.Button1Click(Sender: TObject);
// Step 1 - Declare Variables
var myfile : textfile;
sLine : string;

begin
// Step 2 - check if filename exist
if FileExists( 'teams.txt' ) = FALSE then
begin
showmessage('Datei nicht gefunden') ;
exit;
end;
showmessage('Die Datei ist vorhanden') ;
// Step 3 - Assign File to our variable
AssignFile( myfile, 'teams.txt');

//Step 4: Put the pointer to the top of the textfile
Reset( myfile );

//Step 5: Loop through our textfile
//You must use BEGIN and END
while NOT eof(myfile) do
begin
//Step 6: Get each line of text file into string varibale
readln(myfile , sLine);
redDisplay.Lines.Add( sLine) ;

end; //end of our while loop

//Step 7: Close the association with the text file
closefile (myfile);

end;

end.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:03 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz