Tags
Author: adnanyurdakul - Replies: 8 - Views: 7932
Choose Fonksiyonu
bu fonksiyon belirlenen bir dizi aralığında seçilen elemanı bulur.
Visual Basic
  1. Randomize
  2. sayı = Int((29 * Rnd) + 1)
  3.  
  4. harf = Choose(sayı, "A", "B", "C", "Ç", _
  5. "D", "E", "F", "G", "Ğ", "H", "I", "İ", "J", _
  6. "K", "L", "M", "N", "O", "Ö", "P", "R", "S", "Ş", _
  7. "T", "U", "Ü", "V", "Y", "Z")
  8. Me.SecilenHarf = harf


bu örnekte rastgele oluşturulan bir sayı ile dizidekarşılığı bulunan eleman seçilebilmektedir.