1 / 29

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

koen
Download Presentation

Lazarus?

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. +/- Kelebihan : • Free • Cross Platform IDE (Linux,Mac,Windows) • 3rd party add onsto extend the IDE • Reporting and Charting • CodeTyphon Kelemahan : Programmer kurang/belumpopuler

  3. IDE 1 3 2 Main menu Speed menu Component Pallete

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

  5. Membuat Project Baru Main Menu : Project -> New -> Application Menyimpan project Main Menu : File -> Save All

  6. Object Properties Caption : untukjudul/teks yang dimunculkanpada masing2 komponen Name : inisiasi masing2 komponen (Name tidakbolehmengandungspasi)

  7. Object Properties procedure TForm1.FormCreate(Sender: TObject); begin nama.caption:='NamaSayaBukanKamu'; end;

  8. Event AksiPengguna, digunakanuntukmemanggilprocedure OnClick, OnDblClick, OnExit, dll

  9. Event

  10. Event procedure TForm1.Button1Click(Sender: TObject); begin MessageDlg ('Hello World', mtInformation, [mbOK], 0); end;

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

  12. 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';

  13. Perintah Sequence Perintah-perintah yang akandiprosesolehkompilersecaraberurutan.

  14. Deklarasi DeklarasiKonstantaadalahtandapengenaldalamlazarus yang sudahditetapkannilainya. Const pi=3.14;

  15. Deklarasi DeklarasiVariabeladalahtandapengenaldalam Lazarus yang nilainyadapatterusberubahselama proses aplikasiberjalan Varluas,vol: double;

  16. Operator Operator Penugasan, digunakanuntukmemberikannilaibarupadasebuah variable. Simbol operator penugasan “:=“

  17. Operator Operator Aritmatika, digunakanuntukmelakukan proses aritmatika

  18. Operator A:=‘Aku’; B:=‘Bisa’; C:=A+B; Operator String, digunakanuntukmenggabungkanduabuah string/lebih

  19. var A,B:integer; hasil:double; str_A,str_B,hasil_join:string;

  20. 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;

  21. Tipe Data TipeDasar : • Ordinal (Integer, Boolean) • Real

  22. Tipe Data Integer

  23. Tipe Data Real

  24. Tipe Data TipeKarakter: • Short strings (255) • Wide Strings (2^30) • Ansi Strings (2^31)

  25. Tipe Data var   Name : String[10];    Street : String; Message : AnsiString; Street can contain up to 255 characters

  26. Tipe Data

  27. 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;

  28. 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?

More Related