Sekarang Kita Akan Membuat Array, Array Merupkan Barisan dengan Jenis Data yang disimpan dalam Satu variabel Tunggal, sekarang kita akan membuatnya pada pemrograman Ruby,
Contoh Listing Sederhananya :
a = [1, 2, 'm', [3, 4, 5]]
print "a[] = ",a
puts
print "a[3] = ",a[3]
puts
print "a[3][2] = ",a[3][2]
puts
a[3] = 13
print a
print "\n",a[6]
puts;puts
c = %w[Suci, Hari, Stya, Lukman]
print "c[] = [",c,"]"
FB
Pemrograman Ruby Mengenal Array
Thursday, May 20, 2010
Labels:
Pemrograman,
Ruby
Posted by
Rangga Pratama
at
8:01 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment