29-09-2019, Saat: 23:33
(Son Düzenleme: 29-09-2019, Saat: 23:41, Düzenleyen: Halil Han BADEM.)
(29-09-2019, Saat: 23:26)Hayati Adlı Kullanıcıdan Alıntı: Herkese selam
Tuğrul hocanın Delphi C# Java konusundan geliyorum, yorumları tartışmaları görünce sorup sormamakta tereddüt ettim, forumun seviyesini biraz düşüreceğim ama
Function Topla(i1,i2,i3,i4,i5,i6:TEdit):string; Var s1,s2,s3,s4,s5,s6,sonuc:real; Begin s1 := strtofloat(i1.Text); s2 := strtofloat(i2.Text); s3 := strtofloat(i3.Text); s4 := strtofloat(i4.Text); s5 := strtofloat(i5.Text); s6 := strtofloat(i6.Text); sonuc := s1+s2+s3+s4+s5+s6; Result := floattostrF(sonuc,fffixed, 4, 2); End;
Benzeri bir kod Delphi 2007 de çalışırken XE(x) veya Rio da neden E2003 Undeclared identifier: 'TEdit' (TImage vs vs) hatası veriyor? Belli ki tanımlama şekli değişmiş yardımcı olabilir misiniz?
Selamlar,
Kuvvetle muhtemel kütüphane tanımı yok Rio tarafında. Olması gereken şu şekilde aslında;
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;
type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
function Topla(i1,i2,i3,i4,i5,i6: TEdit): string;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
function TForm1.Topla(i1, i2, i3, i4, i5, i6: TEdit): string;
var
s1,s2,s3,s4,s5,s6,sonuc:real;
Begin
s1 := strtofloat(i1.Text);
s2 := strtofloat(i2.Text);
s3 := strtofloat(i3.Text);
s4 := strtofloat(i4.Text);
s5 := strtofloat(i5.Text);
s6 := strtofloat(i6.Text);
sonuc := s1+s2+s3+s4+s5+s6;
Result := floattostrF(sonuc, fffixed, 4, 2);
end;
end.
Delphi 7'yi en son 12 yaşında kullandım. Belki varsayılan olarak TEdit sınıfını içeren bir kütüphane mevcuttur. Hatırlamıyorum uzun zaman oldu.
Mission Completed:

İyi çalışmalar.
Ek olarak evet kütüphane tanım şekillerinde değişiklik oldu. VLC, FMX gibi ekler getirildi.
BEN DELPHİ 7 ANLAMIŞIM BU ARADA


