<!--#include file=common.asp-->
<%
Dim tmpnum
' Lowercase amount passed from the first page.
Tmpnum=request ("Page1num")
' Call and display the capitalization amount
Response.Write RMB (CDbl (tmpnum))
Response.End
%>
Common.asp
<%
Function RMB (num)
num = FormatNumber (num, 2)
Dim numlist
Dim rmblist
Dim Numlen
Dim NumChar
Dim Numstr
Dim N
Dim N1, N2
Dim Hz
Numlist = "0 One and three Woolu Qi Ba Nine"
Rmblist = "Divide the angle element to collect hundred thousand thousand million to collect hundred thousand million
If num > 9999999999999.99 Then
RMB = "The value of the people beyond the scope"
Exit Function
End If
NUMSTR = CStr (num * 100)
Numlen = Len (NUMSTR)
n = 1
Do While n <= numlen
NumChar = CInt (Mid (NUMSTR, N, 1))
N1 = Mid (numlist, NumChar + 1, 1)
N2 = Mid (rmblist, Numlen-n + 1, 1)
If not n1 = "0" Then
Hz = Hz + CStr (n1) + CStr (n2)
Else
If N2 = "billion" or N2 = "million" or N2 = "meta" or N1 = "0" Then
Do While right (Hz, 1) = "0"
Hz = Left (Hz, Len (Hz)-1)
Loop
End If
If (N2 = "billion" or (N2 = "Million" and Right (Hz, 1) <> "billion") or N2 = "Yuan") Then
Hz = Hz + CStr (n2)
Else
If Left (ok (Hz, 2), 1) = "0" Or right (Hz, 1) <> "billion" Then
Hz = Hz + N1
End If
End If
End If
n = n + 1
Loop
Do While right (Hz, 1) = "0"
Hz = Left (Hz, Len (Hz)-1)
Loop
If Right (Hz, 1) = "META" Then
Hz = Hz + "whole"
End If
RMB = Hz
End Function
%>
This version solves the problem that the decimal places can not be divided, the way to deal with the accounting Method!