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

Slides:



Advertisements
Similar presentations
A Short Review Arrays, Pointers and Structures. What is an Array? An array is a collection of variables of the same type and placed in memory contiguously.
Advertisements

Chapter 9 Technicalities: Classes, etc. Bjarne Stroustrup
Chapter 9 – One-Dimensional Numeric Arrays. Array u Data structure u Grouping of like-type data u Indicated with brackets containing positive integer.
1 VBA Introduction. Basic Components 2 VBA LANGUAGE OFFICE OBJECTS EXCEL OBJECTS ACCESS OBJECTS WORD OBJECTS OUTLOOK OBJECTS POWERPOINT OBJECTS.
Engineering Problem Solving With C++ An Object Based Approach Additional Topics Chapter 10 Programming with Classes.
Hamilton Venus Software User Interface Options
Working with Intrinsic Controls and ActiveX Controls
Firefly Synchronisation Java Demo in 1D Array. 1 Dimension Firefly in Java two neighbors 1. Initialization: 2.
Brown Bag #2 Advanced C++. Topics  Templates  Standard Template Library (STL)  Pointers and Smart Pointers  Exceptions  Lambda Expressions  Tips.
ICE1341 Programming Languages Spring 2005 Lecture #16 Lecture #16 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
Problems and solutions Session 3. Introduction to MATLAB - Solutions 3 Problems 1. Write function Xn = mspolygon(X,x0,a) that scales the INPUT polygon.
MAIN BODY OF PROGRAM DECLARATION ACTION
FLYWHEEL CALCULATIONS The flywheel design is based on calculating the EXCESS ENERGY. This is achieved when then the CYCLE IS COMPLETE and when you click.
SCIP Optimization Suite
Naredba If..Then..Else... Procedure TForm1.Button1Click ( SEnder: Tobject ); Var x, y, Max : Integer; Begin x := StrToInt ( Edit1.Text ); y := StrToInt.
Chapter 7 Introduction to Procedures. So far, all programs written in such way that all subtasks are integrated in one single large program. There is.
Student Data Score First Name Last Name ID GPA DOB Phone... How to store student data in our programs? 1.
Copyright  Hannu Laine C++-programming Part 5 Strings.
An Introduction to Hashing. By: Sara Kennedy Presented: November 1, 2002.
J. Michael Moore From James Tam’s material Multi-Dimensional Arrays CSCE 110.
Introduction to Arrays Chapter 7 Why use arrays? To store & represent lists of homogeneous values To simplify program code To eliminate the need to reread.
CMPUT 101 Lab #6 October 29, :00 – 17:00. Array in C/C++ Array is a structure type variable. One dimension of array int: int num[3]; There are.
Datalogi A 1: 8/9. Book: Cay Horstmann: Big Java or Java Consepts.
Delphi Jon Krueger Matt Merkel Jack Neil. Overview Paradigm and problem domains Language concepts Sample code The history of Delphi Language Comparison.
Chapter seven review. What is the output of: Private Sub cmdButton_Click() Dim i As Integer, a(1 To 4) As integer Open "DATA.TXT" For Input As #1 For.
Arrays. What is the output of: Private Sub cmdButton_Click() Dim i As Integer, a(1 To 4) As integer Open "DATA.TXT" For Input As #1 For i = 1 To 4 Input.
Array Processing: Exercises School of Business Eastern Illinois University © Abdou Illia, Spring 2002 (Week 10, Friday 3/28/2003)
GUI Input and Output Greg Reese, Ph.D Research Computing Support Group Academic Technology Services Miami University.
1 Procedures Blocks of code which can be called from anywhere in a program Enable us to avoid needless repetition of the same code Can take parameters.
ARRAYS 1.Basic Ideas 2.The Array Type 3.Processing Arrays 4.Parallel Arrays 5.Two-dimensional Array 6.Arrays as Parameters.
Data files and databases. Need a control to browse to a file Standard controls for drive folder and list not much use The CommonDialogs control offers.
Delphi Classes – roll your own l Delphi classes u Modify to change visibility of properties l Inherit from others u Add extra specialised behaviour l Create.
Sha Tin Methodist College F.4 Computer Studies Pascal Programming.
Introduction to Java Lecture Notes 3. Variables l A variable is a name for a location in memory used to hold a value. In Java data declaration is identical.
 Structures are like arrays except that they allow many variables of different types grouped together under the same name. For example you can create.
Dialog Boxes.
ME 142 Engineering Computation I Using Subroutines Effectively.
Mark Dixon, School of Computing SOFT 120Page 1 4. User Defined Functions (part 2)
Chapter 3 w Variables, constants, and calculations DIM statements - declaration temporary memory locations identifier, data type, scope data types - values.
Repetition. Loops Allows the same set of instructions to be used over and over again Starts with the keyword loop and ends with end loop. This will create.
ISM 2110 Programming for Business Applications Lecture 2 - Section 2 Delphi and Object Pascal Basic By Tony Chun-Kuen WONG Tutorial after 12/09/2002.
Pay Example (PFirst98) Please use speaker notes for additional information!
ME 142 Engineering Computation I Using Subroutines Effectively.
Created by Alia Al-Abdulkarim 2008 Visual Basic Vs. Java.
Using variable Variables are used to store values.
Support standard JavaScript code with static typing Encapsulation through classes and modules Support for constructors, properties and.
Visual Basic Review LBS 126. VB programming Project Form 1Form 2Form 3 Text boxButton Picture box Objects Text box Button Objects.
Graphical User Interface Components Version 1.1. Obectives Students should understand how to use these basic Form components to create a Graphical User.
Starting Out with Visual Basic.NET 2 nd Edition Chapter 6 Sub Procedures And Functions.
Data Structures: Multi-Dimensional Arrays Damian Gordon.
Introduction to GUI in 1 Graphical User Interface Nouf Almunyif.
Imperative Programming C. Imperative Programming Heart of program is assignment statements Aware that memory contains instructions and data values Commands:
Introduction to Programming Lecture 12. Today’s Lecture Includes Strings ( character arrays ) Strings ( character arrays ) Algorithms using arrays Algorithms.
Section 2.1: Programming paradigms
Java for Beginners Level 6 University Greenwich Computing At School
Proses Pengulangan Dengan FOR
Pemrograman Database Delphi & MySQL
Section 2.1: Programming paradigms
Introduction to VB programming
Двумерные массивы в интегрированной среде Delphi 7
Department Array in Visual Basic
Input and Output Interfaces
البرمجة بلغة فيجول بيسك ستوديو
Use proper case (ie Caps for the beginnings of words)
More Loops.
C++ programming in Windows environment The Borland C++ Builder
Bills Exercise Main Module Declare Integer dollars
Differences between Java and JavaScript
Exercise Solution First questions What's output What's input
Introduction to Programming
Presentation transcript:

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.

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.

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.

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;

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.

Stosowanie tablicy wierszu TStringGrid

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;

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;

STOSOWANIE TABLICY WIERSZU. Wynik.