Download
tipe data set and string n.
Skip this Video
Loading SlideShow in 5 Seconds..
Tipe Data SET and String PowerPoint Presentation
Download Presentation
Tipe Data SET and String

Tipe Data SET and String

73 Vues Download Presentation
Télécharger la présentation

Tipe Data SET and String

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Tipe DataSET and String

  2. Type Nama_set= set of tipe_dasar; Contoh Type Angka= set of 0 .. 9; Type Rupa= (merah, hijau, kuning, biru, ungu); Warna = set of Rupa; Ataubisajugalangsungsebagaiberikut : Type Warna = set of (merah, hijau, kuning, biru, ungu);

  3. Type Mobil = (accord, baleno, charade, civic, corolla, kijang, kuda, panther, vitara, zebra); HimpMobil = set of Mobil; Var Bela, Disa, Kira, Maya, Orak : HimpMobil; Begin Bela := [baleno, civic, vitara]; Disa := [accord .. corolla, vitara]; Kira := [kijang .. zebra]; Maya := [kijang, kuda, panther]; Orak := [];

  4. OperasiHimpunan

  5. Prosedure • Delete(nama_string, indeks, jumlah); Kata:= ‘SelamatBelajar’ Delete(Kata, 5,3) hasilnyaadalah ‘SelaBelajar’. • Concat(s1, s2 {,s3,…, sn}); • Copy(nama_string, indeks, jumlah); Kata:= ‘UMS Surakarta’ Copy(Kata,5,7) hasilnyaadalah ‘Surakar’

  6. Prosedure • Pos(sub_string, nama_string); Kalimat:= ’IkhlasBeramal’ Kata1 := ‘amal’ Kata2 := ‘semu’ Pos(kata1, Kalimat) hasilnyaadalah 11 Pos(kata2, Kalimat) hasilnyaadalah0 • Length(nama_string);

  7. Prosedure Insert(string_asal,string_tujuan, indeks); Kata1 := ‘Jurusan UMS’ Kata2 := ‘Matematika ’ Insert(Kata2, Kata1, 9) hasilnya‘JurusanMatematika UMS’