<%
'***********************************
'Fungsi: koma (str)
'Parameter: str, nomor yang akan diproses
'Penulis: Alixi
'Tanggal: 2007/7/12
'Deskripsi: Mengembalikan nilai yang diformat dalam tampilan nomor numerik di keseributan
'Contoh: <%= koma ("120300")%>
'***********************************
FunctionComma (str)
ifnot (isNumeric (str)) orstr = 0then
Hasil = 0
elseiflen (fix (str)) <4then
hasil = str
kalau tidak
pos = instr (1, str, ".")
ifpos> 0then
dec = mid (str, pos)
endif
res = strreverse (fix (str))
loopcount = 1
whileloopcount <= len (res)
Tempresult = Tempresult+Mid (Res, LoopCount, 3)
loopcount = loopcount+3
ifloopcount <= len (res) lalu
Tempresult = Tempresult+","
endif
pergi ke
Hasil = Strreverse (Tempresult)+Des
endif
koma = hasil
fungsi endfungsi
%>