最怕是科学记数法function GetScale(byval d as double) as long dim s as string s=cstr(d) if instr(1,s,".")>0 then GetScale=len(s)-instr(1,s,".") else GetScale=0 end if end function
f=12.1 s=cstr(f) p=instr(s,".") if p>0 then result=len(s)-p else result= 0 end if
dim s as string
s=cstr(d)
if instr(1,s,".")>0 then
GetScale=len(s)-instr(1,s,".")
else
GetScale=0
end if
end function
s=cstr(f)
p=instr(s,".")
if p>0 then
result=len(s)-p
else
result= 0
end if