Bahasa Turbo Basic bukan bahasa pemograman terstruktur seperti bahasa Pascal sehingga bahasa Turbo Basic adalah bahasa yang paling mudah digunakan.
Saat ini kita akan membuat program membuat link ke website tertentu dengan melalui Turbo Basic, bisakah ? kita coba saja membuatnya, pertama-tama jalankan file tb.exe dari DOS atau Windows dan anda akan mendapat tampilan seperti ini.

10
cls
print " Membuat link website dengan Bahasa Turbo Basic
print " 1. familycode
print " 2. google
print " 3. yahoo
print " 4. kafegaul
print " 5. exit
input " Ketikkan nomor atau nama situs yang ingin dikunjungi : " a$ if a$ = "1" then goto 110
if a$ = "familycode" then goto 110
if a$ = "2" then goto 120
if a$ = "google" then goto 120
if a$ = "3" then goto 130
if a$ = "yahoo" then goto 130
if a$ = "4" then goto 140
if a$ = "kafegaul" then goto 140
if a$ = "5" then goto 200
if a$ = "exit" then goto 200
100
print "Maaf perintah anda tidak dikenal atau situs yang anda cari tidak ada"
shell "pause"
goto 10
110
shell "c:"
shell "cd\progra~1\intern~1"
shell "iexplore http://www.yogyafree.tk
goto 10
120
shell "c:"
shell "cd\progra~1\intern~1"
shell "iexplore http://www.google.com
goto 10
130
shell "c:"
shell "cd\progra~1\intern~1"
shell "iexplore http://www.yahoo.com
goto 10
140
shell "c:"
shell "cd\progra~1\intern~1"
shell "iexplore http://www.kafegaul.com
goto 10
150
goto 200
200
end
Setelah selesai coba jalankan program dengan memilih RUN, jika berhasil hasilnya seperti dibawah ini.

option lalu pilih Compile to lalu pilih EXE file seperti gambar dibawah ini :

dan Windows.
0 komentar:
Posting Komentar