delphi4arab منتديات دلفي للعرب
[تمرين] ما الخطأ في هذا الكود - نسخة قابلة للطباعة

+- delphi4arab منتديات دلفي للعرب (https://delphi4arab.net/forum)
+-- قسم : منتديات دلفي للعرب التعليمية (https://delphi4arab.net/forum/forumdisplay.php?fid=3)
+--- قسم : تمارين دلفي وحلول (https://delphi4arab.net/forum/forumdisplay.php?fid=16)
+--- الموضوع : [تمرين] ما الخطأ في هذا الكود (/showthread.php?tid=3988)



[تمرين] ما الخطأ في هذا الكود - DAMAX2010 - 11-03-2012

[FONT="Comic Sans MS"][COLOR="Purple"]السلام عليكم
لتنشيط المنتدى شوية بمسابقات و تمارين مفيدة
ما الأخطاء في الكود
PHP كود :
procedure TForm1.Button1Click(Sender: TObject);
var
go : Integer;
begin
go
: 'not found';
IEHTTP1.ExecuteURL(Edit1.Text);
if 
IdHTTP1.Response.ResponseCode =go then
ShowMessage
('File Exist') else
ShowMessage('File Do Not Exist');
end; 

بالتوفيق للجميع[/COLOR]



[تمرين] ما الخطأ في هذا الكود - onexite - 12-03-2012

الخطا واضح انت عرفت go على انه integer وبعد ذلك
وضعت فيه قيمة من نوع string


[تمرين] ما الخطأ في هذا الكود - DAMAX2010 - 12-03-2012

onexite كتب :الخطا واضح انت عرفت go على انه integer وبعد ذلك
وضعت فيه قيمة من نوع string

صح الخطأ الأول

PHP كود :
procedure TForm1.Button1Click(Sender: TObject);
var
go : String;
begin
go
: 'not found';
IEHTTP1.ExecuteURL(Edit1.Text);
if 
IdHTTP1.Response.ResponseCode =go then
ShowMessage
('File Exist') else
ShowMessage('File Do Not Exist');
end; 

و الان الخطأ الثاني ^^



[تمرين] ما الخطأ في هذا الكود - لؤي - 12-03-2012

DAMAX2010 كتب :


و الان الخطأ الثاني ^^

عكس شرط IF

PHP كود :
var
go : String;
begin
go
:= 'not found';
IEHTTP1.ExecuteURL(Edit1.Text);
if 
IdHTTP1.Response.ResponseCode <> go then
ShowMessage
('File Exist') else
ShowMessage('File Do Not Exist');
end; 



[تمرين] ما الخطأ في هذا الكود - virtual - 19-03-2012

كود :
uses windows; type t_rec = record public procedure ShowMsg(msg : string); procedure init(); msg : string; end; { t_rec } procedure t_rec.init; begin msg := 'Record string'; end; procedure t_rec.ShowMsg(msg: string); begin MessageBox(0,pchar(msg),'h',0); end; var test : t_rec; begin test.init(); test.ShowMsg('Argument String'); end.

بدون تجريب الكود الاجراء showMsg سيضهر Argument String او Record String


RE: [تمرين] ما الخطأ في هذا الكود - chamsderreche - 28-03-2018

كتبت g: و نسيت = و يفترض أن تكتب g:=