--- Restore content start ---
Function rmb2dx (F: string): string; // supports wide characters.
VaR
FS, dx, D2, ZS, xs, H, JG: string;
I, WS, {L,} W, J, LX: integer;
Begin
F: = trim (f );
If copy (F, 1, 1) = '-' then
Begin
Delete (F, 1, 1 );
FS: = 'negative ';
End
Else
FS: = '';
DX ';
D2: = 'catch up with trillions of shares ';
I: = ansipos ('.', f); // decimal point
If I = 0 then
ZS: = f // integer
Else
Begin
ZS: = copy (F, 1, I-1); // integer
Xs: = copy (F, I + 1,200 );
End;
WS: = 0; // L: = 0;
For I: = length (ZS) downto 1 do
Begin
WS: = ws + 1;
H: = '';
W: = strtoint (copy (ZS, I, 1 ));
If (W = 0) and (I = 1) then
JG: = '0 ';
If W> 0 then
Case ws
2. 5: H: = copy (D2, WS-1, 1 );
6 .. 8:
Begin
H: = copy (D2, WS-5, 1 );
If ansipos ('wan', JG) = 0 then
H: = H + 'wan ';
End;
10 .. 13: H: = copy (D2, WS-9, 1 );
End;
JG: = copy (dx, W + 1, 1) + H + JG;
If Ws = 9 then
JG: = copy (JG, 1, 1) + 'yi' + copy (JG, 3,200 );
End;
J: = ansipos ('subnet', JG );
While j> 0 do
Begin
JG: = copy (JG, 1, J-1) + copy (JG, J + 1,200 );
J: = ansipos ('subnet', JG );
End;
If (length (JG)> 1) and (copy (JG, length (JG)-1, 1) = '0') then
JG: = copy (JG, 1, length (JG)-1 );
J: = ansipos ('000000', JG );
If j> 0 then
JG: = copy (JG, 1, J-1) + copy (JG, J + 1,200 );
// Convert the decimal part
Lx: = length (XS );
If lx> 0 then
Begin
JG: = JG + 'meta ';
For I: = 1 to lx do
Begin
If I = 1 then
Begin
JG: = JG + copy (dx, strtoint (copy (XS, I, 1) + 1, 1 );
JG: = JG + 'angular ';
End;
If I = 2 then
Begin
JG: = JG + copy (dx, strtoint (copy (XS, I, 1) + 1, 1 );
JG: = JG + 'die ';
End;
End;
J: = ansipos ('zero angle and zero point', JG );
If j> 0 then
JG: = copy (JG, 1, J-1) + copy (JG, J + 4,200) + 'Integral ';
J: = ansipos ('zero angular ', JG );
I: = ansipos ('zero point', JG );
If (j> 0) and (I> 0) then
JG: = copy (JG, 1, J-1) + copy (JG, J + 2,200)
Else
Begin
If (j> 0) and (I = 0) then
JG: = copy (JG, 1, J + 1) + copy (JG, J + 2,200 );
If I> 0 then
JG: = copy (JG, 1, I-1 );
End;
End
Else
JG: = JG + 'yuan ';
Result: = FS + JG;
End;
--- Restore content end ---
Capital RMB xe2