Function Huruf Berjalan

***********************************************************************
* Fungsi Huruf berjalan
* Clipper 5.2
* Programmer Name : Armansyah
* PC-TEST : IBM AT Ps/ValuePoint 486 SX
***********************************************************************

#include “atur.ch”
Function Hrfjalan(nBaris, cPesan, nTunda, cWarna)
local nJumlah
local nKiri
local nKolom
local nMulai
local cTemp
local xx
Local Layar
Local Kursor
Local Warna
local nMaxKol := maxcol()
Kursor :=setcursor(0)
Default nBaris to 5
Default cWarna to “n/w”
Default cPesan to “01/Feb/96 – Tekan tombol Enter – 11/Ram/1416H”
if nBaris <= maxrow()

cPesan := substr(cPesan, 1, 70)
default nTunda to 0
Warna := setcolor(cWarna)
nJumlah := len(cPesan) + 10
nKiri := int((nMaxKol + 1 – nJumlah) / 2)
@ nBaris, nKiri ssay replicate(chr(46), nJumlah)
nKolom := nKiri + nJumlah – 6
nMulai := 1
while inkey() == 0
cTemp := substr(cPesan, nMulai, nJumlah + nKiri – nKolom – 5) + ;
if(nMulai > 1, replicate(chr(46), nMulai – 1), ”)
@ nBaris, nKolom ssay cTemp
if nTunda == 0
tone(Nada_jalan, 1)
else
for xx := 1 to nTunda
next
endif
if nKolom == nKiri + 5
if ++nMulai > nJumlah – 10
@ nBaris, nKolom ssay chr(46)
nKolom := nKiri + nJumlah – 5
nMulai := 1
endif
else
nKolom–
endif
enddo
Setcolor(Warna)
Setcursor(Kursor)

endif
return NIL

Categories: Clipper | Tinggalkan komentar

Navigasi pos

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Buat situs web atau blog gratis di WordPress.com.

%d blogger menyukai ini: