1 / 13

Pemrograman Visual Foxpro

Pemrograman Visual Foxpro. Pertemuan ke-2. Pre Test. Kerjakan Modul Halaman 18. Variabel, Tipe Data & Operator.

dunn
Télécharger la présentation

Pemrograman Visual Foxpro

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. Pemrograman Visual Foxpro Pertemuan ke-2

  2. Pre Test • Kerjakan Modul Halaman 18

  3. Variabel, Tipe Data & Operator • Variabel adalah tempat sementara untuk menampung nilai data sebelum disimpan pada penyimpanan tetap. Penggunaan variabel dalam visual foxpro tidak harus dideklarasikan terlebih dahulu dan tidak menggunakan tipe data

  4. Jenis Variabel • Variabel Global • Variabel global dapat berlaku diseluruh program. Cara mendefinisikan variabel global dengan menggunakan Public • Variabel Lokal • Variabel lokal hanya berlaku di sub program tertentu saja. Cara mendefinisikan variabel lokal dengan menggunakan Local

  5. Tipe Data • Character • Character Binary • Float • Double • Currency • Date • DateTime • Integer • Numeric • Logical • Memo • General

  6. Operator Aritmatika

  7. Operator Logical

  8. Operator Relasi

  9. Contoh :

  10. Kode Program Object: CmdHitung Procedure: Click Nilai1=VAL(thisform.txtnilai1.Value) Nilai2=VAL(thisform.txtnilai2.Value) hasil=nilai1+nilai2 thisform.txthasil.Value=hasil Object: CmdKeluar Procedure: Click thisform.Release Fungsi VAL digunakan untuk mengubah tipe data character ke numeric Kebalikan fungsi val adalah fungsi STR yang digunakan untuk mengubah Tipe data numeric ke tipe data character

  11. Membuat TextBox Bernilai Angka (bertipe data numeric)

  12. Post Test 1 : Buatlah Perancangan dan kode program untuk aplikasi berikut ini !

  13. Post Test 2 : Buatlah Perancangan dan kode program untuk aplikasi berikut ini !

More Related