Presentation is loading. Please wait.

Presentation is loading. Please wait.

Główny program projektu w Delphi oraz ego składniki. program Control1; uses Forms, Main in 'MAIN.PAS' {Form1}; begin Application.CreateForm(TForm1, Form1);

Similar presentations


Presentation on theme: "Główny program projektu w Delphi oraz ego składniki. program Control1; uses Forms, Main in 'MAIN.PAS' {Form1}; begin Application.CreateForm(TForm1, Form1);"— Presentation transcript:

1 Główny program projektu w Delphi oraz ego składniki. program Control1; uses Forms, Main in 'MAIN.PAS' {Form1}; begin Application.CreateForm(TForm1, Form1); Application.Run; end.

2 Ogólna budowa biblioteki Unit w Delphi. Unit t; Interface Uses Type = Class(Tform) Private { Private declarations } Public { Public declarations } end; Const ; Var ; Implementation {$R *.DFM} // komentarzy ; end.

3 Obiekty i moduły. struktura modułu definiowane przez programistę. inicjacja i finalizacja. unit Main;{Żaglówek Modułu} Uses interface {Sekcja Interface} Const ; Typy ; Var ; Procedure 1 ( ); Moduł w Delpi ma następne formę.................. Function 1 ( ): ;....................................... = Class(Tform) Private { Private declarations } Public { Public declarations } end; implementation {Sekcja Implementation} end.

4 Budowa biblioteki Unit w Delphi.Przykład. Unit Pol_Unit; Interface Uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, Forms, Dialogs, TabNotBk, StdCtrls, Buttons, Spin, Grids, Algb_Lib, ExtCtrls,Plssunit, ComCtrls; Type TPolSys = Class(TForm) TabbedNotebook1: TTabbedNotebook; StringGrid1: TstringGrid1; ……………………………………. PrintDialog1: TPrintDialog; Main_ProblemRadioButton: TRadioButton; Procedure Put_Elmnt(Sender: TObject); Procedure Scan_Elmnt(Sender: TObject); ………………………………………….. procedure Print_Dialog(Sender: TObject);} Private { Private declarations } Public { Public declarations } end;

5 Budowa biblioteki Unit w Delphi.Przykład. Const Max_Ind =10; Var PolSys : TPolSys; Num_Met : Num_Metods; N,N1,Ni,i,j, K,kod,Long,Ier, Deg_Pol : Integer; At : Matrix; Xt : Vector; Lxt,Lyt : Lambda_Vektr; Str : String; Apol : Lambda_Matrix; { Array[1..Max_Ind,1..Max_Ind,0..Max_Ind] of Real;} Implementation {$R *.DFM} procedure TPolSys.Input_Total(Sender: TObject); begin N:=SystemDegre.value;....... end; end.

6 Stosowanie tablicy wierszu TStringGrid

7 STOSOWANIE TABLICY WIERSZU. Przykłady. procedure TTabbedNotebookDlg1.Sol_Esmp(Sender: TObject); Var N,N1,i,j, k,kod,Long : Integer; At : matrix; Xt : Vector; Str : string; begin n:=SpinEdit1.value; n1:=N+1; with StringGrid1 do begin for i:=1 to n do cells[i,0]:='a['+IntToStr(i)+',j]'; end;

8 STOSOWANIE TABLICY WIERSZU. Przykłady. with StringGrid1 do begin for i:=1 to n do Begin for j:=1 to n+1 do begin Val(Cells[j,i],At[i,j],Kod); end; End; end; ESSEMP(At,N,N+1,Xt); with StringGrid1 do begin Cells[N+2,0]:='X[i]='; for i:=1 to n do cells[N+2,i]:=FloatToStr(Xt[i]); end;

9 STOSOWANIE TABLICY WIERSZU. Wynik.


Download ppt "Główny program projektu w Delphi oraz ego składniki. program Control1; uses Forms, Main in 'MAIN.PAS' {Form1}; begin Application.CreateForm(TForm1, Form1);"

Similar presentations


Ads by Google