Download
1 / 29

Lazarus? - PowerPoint PPT Presentation


  • 251 Views
  • Uploaded on

Lazarus?. Lazarus is a free cross-platform visual integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler. Lazarus = Versi Gratis Delphi More : http://wiki.lazarus.freepascal.org/History. +/-. Kelebihan : Free

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Lazarus?' - koen


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Lazarus
Lazarus?

Lazarus is a free cross-platform visual integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler.

Lazarus = Versi Gratis Delphi

More : http://wiki.lazarus.freepascal.org/History


+/-

Kelebihan :

  • Free

  • Cross Platform IDE (Linux,Mac,Windows)

  • 3rd party add onsto extend the IDE

  • Reporting and Charting

  • CodeTyphon

    Kelemahan : Programmer kurang/belumpopuler


IDE

1

3

2

Main menu

Speed menu

Component Pallete


More : http://wiki.freepascal.org/Lazarus_Tutorial


Membuat project baru
Membuat Project Baru

Main Menu : Project -> New -> Application

Menyimpan project

Main Menu : File -> Save All


Object properties
Object Properties

Caption : untukjudul/teks yang dimunculkanpada masing2 komponen

Name : inisiasi masing2 komponen

(Name tidakbolehmengandungspasi)


Object properties1
Object Properties

procedure TForm1.FormCreate(Sender: TObject);

begin

nama.caption:='NamaSayaBukanKamu';

end;


Event
Event

AksiPengguna, digunakanuntukmemanggilprocedure

OnClick, OnDblClick, OnExit, dll



Event2
Event

procedure TForm1.Button1Click(Sender: TObject);

begin

MessageDlg ('Hello World', mtInformation, [mbOK], 0);

end;


Event3
Event

MessageDlg ('Hello World', mtInformation, [mbOK], 0);


Event4
Event

If MessageDlg('Please say YES or NO', mtConfirmation,[mbYes,mbNo],0)=mrYESthen

Label1.Caption:='Your Answer is Yes'

Else Label1.Caption:='Your Answer is NO';


Perintah sequence
Perintah Sequence

Perintah-perintah yang akandiprosesolehkompilersecaraberurutan.


Deklarasi
Deklarasi

DeklarasiKonstantaadalahtandapengenaldalamlazarus yang sudahditetapkannilainya.

Const pi=3.14;


Deklarasi1
Deklarasi

DeklarasiVariabeladalahtandapengenaldalam Lazarus yang nilainyadapatterusberubahselama proses aplikasiberjalan

Varluas,vol: double;


Operator
Operator

Operator Penugasan, digunakanuntukmemberikannilaibarupadasebuah variable.

Simbol operator penugasan “:=“


Operator1
Operator

Operator Aritmatika, digunakanuntukmelakukan proses aritmatika


Operator2
Operator

A:=‘Aku’;

B:=‘Bisa’;

C:=A+B;

Operator String, digunakanuntukmenggabungkanduabuah string/lebih


var

A,B:integer;

hasil:double;

str_A,str_B,hasil_join:string;


A:=StrToInt(editA.Text);

B:=StrToInt(editB.Text);

Hasil:=A+B;

edithasil.Text:=FloatToStr(Hasil);

str_A:=editA.Text;

str_B:=editB.Text;

Hasil_join:=str_A+str_B;

edithasil.Text:=Hasil_join;


Tipe data
Tipe Data

TipeDasar :

  • Ordinal (Integer, Boolean)

  • Real


Tipe data1
Tipe Data

Integer


Tipe data2
Tipe Data

Real


Tipe data3
Tipe Data

TipeKarakter:

  • Short strings (255)

  • Wide Strings (2^30)

  • Ansi Strings (2^31)


Tipe data4
Tipe Data

var   Name : String[10];    Street : String;

Message : AnsiString;

Street can contain up to 255 characters


Tipe data5
Tipe Data


Tipe data6
Tipe Data

procedure TForm2.btnHitungClick(Sender: TObject);

var p,l,t,luas,vol : integer;

begin

P:=StrToInt(editPanjang.Text);

L:=StrToInt(editLebar.Text);

T:=StrToInt(editTinggi.Text);

Vol:=P*L*T;

Luas:=(2*P*L)+(2*P*T)+(2*L*T);

editLuas.Text:=IntToStr(Luas);

editVolume.Text:=IntToStr(Vol);

end;


Tipe data7
Tipe Data

Buatlah aplikasi untuk menghitung Volume dan Luas Permukaan Bola, rumusnya sbb :

Volume := 4/3 * 3.14 * R * R * R

Luas := 4 * 3.14 * R * R

Tipe data apakah yang harus/pantas digunakan?


ad