When the formatNumber of asp is processed with values similar to 25/5, the result is 5.00 when the value similar to 28/8 is processed with values similar to 28/8, the result is 3.50
Improve it, remove useless 0s so that the results are 5 and 3.5 respectively
The code copy is as follows:
Functionfm(nb)
IfIsNumeric(nb)Then
Dima
a=FormatNumber(nb,2,-1)
IfRight((a+""),2)=00Then
fm=CLng(a)
Else
fm=FormatNumber(nb,1,-1)
Endif
Else
fm=0
Endif
EndFunction