K
king.gray
Unregistered / Unconfirmed
GUEST, unregistred user!
帮忙译成DELPHI程序!
local array1[3], buffer, s, kh, vsign, ntime, jh
s = ""
do while .t.
if this.parent.mscomm.inbuffercount > 0
vsign = .t.
buffer = this.parent.mscomm.input
array1 = buffer
if asc(array1[1]) != 13
s = s + array1[1]
endif
else
*没有数据或数据已经取完
if vsign
*数据已经取完
vsign = .f.
if len(allt(s)) = 11
ntime = left(allt(s), 2) + ":" + substr(allt(s), 3, 2)
kh = ((asc(substr(allt(s),5,1)) - 48) * 16
+ (asc(substr(allt(s),6,1)) - 48)) * 50000
+ val(right(allt(s),5))
kh = allt(str(kh))
local array1[3], buffer, s, kh, vsign, ntime, jh
s = ""
do while .t.
if this.parent.mscomm.inbuffercount > 0
vsign = .t.
buffer = this.parent.mscomm.input
array1 = buffer
if asc(array1[1]) != 13
s = s + array1[1]
endif
else
*没有数据或数据已经取完
if vsign
*数据已经取完
vsign = .f.
if len(allt(s)) = 11
ntime = left(allt(s), 2) + ":" + substr(allt(s), 3, 2)
kh = ((asc(substr(allt(s),5,1)) - 48) * 16
+ (asc(substr(allt(s),6,1)) - 48)) * 50000
+ val(right(allt(s),5))
kh = allt(str(kh))