| 发表于:2007-01-08 12:31:012楼 得分:6 |
function recvcmdcom(buf as string) as string dim strread as string dim intbeginbit as integer dim intendbit as integer intbeginbit = instr(1, buf, ", ") '这句加个判断 if intbeginbit = 0 then '如果buf 中没有 ", " ,那么 recvcmdcom= " " exit function end if intendbit = instr(intbeginbit, buf, ": ") '这句加个判断 if intbeginbit = 0 then '如果buf 中没有 ": " ,那么 recvcmdcom= " " exit function end if strread = mid(buf, intbeginbit + 1, intendbit - intbeginbit - 1) recvcmdcom = str(val( "&h " & strread)) end function | | |
|