I have contacted the author, has been changed, just did not update in this, the following is the correct code

Source: Internet
Author: User
Tags definition
<%
Dim a ' the amount to be converted to uppercase
Dim Atoc ' Value after conversion
Dim String1 ' definition as follows
Dim String2 ' definition as follows
Dim String3 ' value removed from the original a value
Dim I ' Loop variable
The value of Dim J ' A is multiplied by the string length of 100
Dim Ch1 ' Digital Chinese reading method
Dim Ch2 ' digit character reading method
Dim Nzero ' used to calculate a continuous 0 value is a few

String1 = "0 One and three Woolu Qi Ba Nine"
String2 = "thousand thousand hundred million thousand thousand hundred to collect the element angle cent"
Nzero = 0

If InStr (1, CSTR (A *), ".") <> 0 Then
Err. Raise 5000, "This function (ATOC ()) can only convert the number within two digits after the decimal point!" "
End If

J = Len (CStr (A * 100))
String2 = Right (String2, J) ' takes out the value of the STRING2 of the corresponding digits

For I = 1 to J
String3 = Mid (A *, I, 1) ' Remove the value of a bit that needs to be converted

If I <> (J-3) + 1 and I <> (J-7) + 1 and I <> (J-11) + 1 and I <> (J-15) + 1 Then
If String3 = 0 Then
CH1 = ""
CH2 = ""
Nzero = Nzero + 1
ElseIf String3 <> 0 and nzero <> 0 Then
CH1 = "0" & Mid (String1, CLng (String3) + 1, 1)
CH2 = Mid (String2, I, 1)
Nzero = 0
Else
CH1 = Mid (String1, CLng (String3) + 1, 1)
CH2 = Mid (String2, I, 1)
Nzero = 0
End If
Else ' The bit is a trillion, billion, million, a bit of key bits
If String3 <> 0 and nzero <> 0 Then
CH1 = "0" & Mid (String1, CLng (String3) + 1, 1)
CH2 = Mid (String2, I, 1)
Nzero = 0
ElseIf String3 <> 0 and Nzero = 0 Then
CH1 = Mid (String1, CLng (String3) + 1, 1)
&n



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.