1 / 10

Perulangan

Perulangan. Jenis Perulangan. Dalam VB 6 ada 2 jenis perulangan: For ... Next Do ... Loop. For ... Next. FOR < pencacah > = < awal > TO < akhir > [STEP < langkah >] < blok kode program> NEXT < pencacah >. Kond. Pernyataan. Keterangan :.

alcina
Download Presentation

Perulangan

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

  2. Jenis Perulangan • Dalam VB 6 ada 2 jenis perulangan: • For ... Next • Do ... Loop

  3. For ... Next FOR <pencacah> = <awal> TO <akhir> [STEP <langkah>] <blokkode program> NEXT <pencacah> Kond Pernyataan

  4. Keterangan: • <pencacah> adalahvariabel (tipe: integer) yang digunakanuntukmenyimpanangkapengulangan. • <awal> adalahnilaiawaldari <pencacah>. • <akhir> adalahnilaiakhirdari <pencacah>. • <langkah> adalahperubahannilai <pencacah> setiappengulangan. Sifatnya optional (bolehditulisataupuntidak). Bilatidakditulismakanilai <langkah> adalah 1.

  5. Do ... Loop • Ada 2 jenis do...loop: • Do while ... Loop • Do until ... Loop

  6. Do While ... Loop DO WHILE <kondisi> <blokkode program> LOOP Kond Pernyataan • <blokkode program> akandiulangselama<kondisi> bernilai TRUE. Pengulanganberhentibila <kondisi> sudahbernilai FALSE

  7. Do Until ... Loop DO UNTIL <kondisi> <blokkode program> LOOP Kond Pernyataan <blokkode program> akandiulangsampai<kondisi> bernilai TRUE. Pengulanganberhentibila <kondisi> sudahbernilai TRUE.

  8. Grid • Flexgrid • Datagrid

  9. Flexgrid Fixrow Fixcol Rows Cols Textmatrix(row,col)

  10. Contoh • Buatlah form seperti dibawah ini, program ini adalah mengisi grid sejumlah perulangan pada teks diatasnya

More Related