i made this cloble class but it read to 9999 in arbic
what i need
to read also 10000 ten thu and more
100000 one hundred th and more
1000000 milion and more
this fun i need for the pepole have experience of more than me to give rigth fun plse
static TempStr numeralsToTxt_Arabic(real _num )
{ real _num1=_num ;
int len;
str thustr ;
str hunstr;
str tenstr ;
str onestr ;
int thouthannew ;
int hndnew ;
int tennew ;
int onenew ;
// str 10 WA =’ و ’ ;
int thunum
;
int64 numOfPower;
int numOfPennies = (decround(frac(_num1), 2) * 100) mod 100;
real test = _num1 - frac(_num1);
int numOfTenths,flag,flag2,flag3;
str 20 WATen[2],WAThu[2],WA[2] ,ones[19], tenths[9], hundreds[10], thousands[4], millions, billions, trillions;
int nWA;
int ThunWA;
int TenWA;
int64 temp;
str 200 returntxt,returntxta,returnTithe,returnTitheHundreds;
real modOperator(real a1, real a2)
{
int tmpi;
real tmp1, tmp2;
tmp1 = a1 / a2;
tmpi = real2int(tmp1);
tmp2 = tmpi;
return (tmp1 - tmp2)*a2;
}
ones[1] = “واحد”;
ones[2] = “اثنان”;
ones[3] = “ثلاثة”;
ones[4] = “أربعة”;
ones[5] = “خمسة”;
ones[6] = “ستة”;
ones[7] = “سابعة”;
ones[8] = “ثمانية”;
ones[9] = “تسعة”;
ones[10] = “عشرة”;
ones[11] = “أحد عشر”;
ones[12] = “اثنا عشر”;
ones[13] = “ثلاثة عشر”;
ones[14] = “أربعة عشرة”;
ones[15] = “خمسة عشر”;
ones[16] = “ست عشرة”;
ones[17] = “سبعة عشر”;
ones[18] = “ثمانية عشر”;
ones[19] = “تسعة عشر”;
tenths[1] = ‘’;
tenths[2] = “عشرون”;
tenths[3] = “ثلاثون”;
tenths[4] = “أربعون”;
tenths[5] = “خمسون”;
tenths[6] = “ستون”;
tenths[7] = “سبعون”;
tenths[8] = “ثمانون”;
tenths[9] = “تسعون”;
hundreds[1] = “مائة”;
hundreds[2]=(‘مائتان’);
hundreds[3]=(‘ثلاثمائة’);
hundreds[4]=(‘اربعمائة’);
hundreds[5]=(‘خمسمائة’);
hundreds[6]=(‘ستمائة’);
hundreds[7]=(‘سبعمائة’);
hundreds[8]=(‘ثمنمائة’);
hundreds[9]=(‘تسعمائة’);
thousands[1] = “ألف”;
thousands[2] = “ألفان”;
thousands[3] = “ألاف”;
millions = “مليون”;
billions = “مليار”;
trillions = “تريليون”;
WA[1] = ’ ’ ;
WA[2] = ’ و ’ ;
WAThu[1] = ’ ’ ;
WAThu[2] = ’ و ’ ;
WATen[1] = ’ ’ ;
WATen[2] = ’ و ’ ;
len = strlen(int2str(_num1));
if (len == 4)
{
thouthannew= str2int (substr(int2str(_num1),1,1));
hndnew= str2int (substr(int2str(_num1),2,1));
tennew = str2int (substr(int2str(_num1),3,2));
onenew= str2int (substr(int2str(_num1),3,2));
}
if (len == 3)
{
hndnew= str2int (substr(int2str(_num1),1,1));
tennew = str2int (substr(int2str(_num1),2,2));
onenew= str2int (substr(int2str(_num1),2,2));
}
if (len == 2)
{
tennew = str2int (substr(int2str(_num1),1,2));
onenew= str2int (substr(int2str(_num1),1,2));
}
if (len == 1 )
{ onenew= str2int (substr(int2str(_num1),1,1));
}
if (len ==1 ||len == 2)
{
ThunWA=1 ;
if (tennew==0)
{ tennew=1;}
if (onenew <20 )
{
if (tennew ==1)
{
tennew= str2int (substr(int2str(_num1),1,2));
nWA =2
;
TenWA=2;
}
}
else
{onenew= str2int (substr(int2str(_num1),2,1));
nWA =2 ;
TenWA=2;
}
if (tennew >19)
{
tennew = str2int (substr(int2str(_num1),1,1));
nWA =2 ;
TenWA=2;
}
else
{
tennew = 1 ;
nWA =1 ;
TenWA=1;
}
}
if (len == 3)
{
ThunWA=1 ;
hndnew= str2int (substr(int2str(_num1),1,1));
if (tennew==0)
{ tennew=1;}
if (onenew <20 )
{
if (tennew ==1)
{
tennew= str2int (substr(int2str(_num1),2,1));
nWA =2 ;
}
}
else
{onenew= str2int (substr(int2str(_num1),3,1));
nWA =2 ;
}
if (tennew >19)
{
tennew = str2int (substr(int2str(_num1),2,1));
nWA =2 ;
}
else
{
tennew = 1 ;
nWA =1 ;
}
}
if (len == 4)
{
ThunWA=2 ;
if (tennew==0)
{ tennew=1;
}
if (onenew <20 )
{
if (tennew ==1)
{
tennew= str2int (substr(int2str(_num1),3,2));
nWA =2 ;
}
}
else
{onenew= str2int (substr(int2str(_num1),4,1));
nWA =2 ;
}
if (tennew >19)
{
tennew = str2int (substr(int2str(_num1),3,1));
nWA =2 ;
TenWA=2;
}
else
{
tennew = 1 ;
nWA =2 ;
TenWA=1;
}
if (hndnew>0)
{
tennew = str2int (substr(int2str(_num1),3,1));
if (tennew == 0 )
{ nWA =2 ;
TenWA=2;}
else
hndnew= str2int (substr(int2str(_num1),2,1));
{
if (tennew == 1 ){ nWA =1;}
else
nWA =2 ;
TenWA=1;}}
if(onenew==0&&tennew<=1&&hndnew==0&&thouthannew!=0)
{ if (thouthannew >=3)
{
returntxta =ones[thouthannew]+’ ’ +thousands[3] +WAThu[1] ;
}
else
{
returntxta =thousands[thouthannew]+WAThu[1] ;
}}
else {
if (thouthannew >=3)
{
returntxta =ones[thouthannew]+’ ’ +thousands[3] +WAThu[1] ;
}
else
{
returntxta =thousands[thouthannew]+WAThu[1] ;
}
}
}
if(onenew!=0&&tennew!=0&&hndnew==0)
{returntxta =returntxta+ WAThu[ThunWA] + ones[onenew] +WATen[TenWA] +tenths[tennew] ;
}
if(onenew!=0&&tennew!=0&&hndnew!=0)
{ returntxta =returntxta+ WAThu[ThunWA] + hundreds [hndnew]+’ و '+ones[onenew]+WA[nwa] + tenths[tennew] ;
}
if (onenew==0&&tennew==0&&hndnew!=0)
{
returntxta =returntxta+ WAThu[ThunWA] + hundreds [hndnew] ;
}
if(onenew==0&&tennew!=0&&hndnew!=0)
{returntxta =returntxta+ WAThu[ThunWA] + hundreds [hndnew]+ WA[nwa]+ tenths[tennew];
}
if(tennew!=0&&onenew==0&&hndnew==0)
{
returntxta =returntxta+ WAThu[ThunWA] +tenths[tennew] ;
}
if(onenew!=0&&tennew==0&&hndnew!=0)
{ returntxta =returntxta+ WAThu[ThunWA] + hundreds [hndnew]+WA[nwa]+ones[onenew]+WATen[Tenwa] ;
}
if(onenew==0&&tennew<=1&&hndnew==0&&thouthannew!=0)
{ if (thouthannew >=3)
{
returntxta =ones[thouthannew]+’ ’ +thousands[3] + WAThu[1] ;
}
else
{
returntxta =thousands[thouthannew]+ WAThu[1] ;
}
}
returntxta=returntxta + ’ ’ + ‘ريال سعودي فقط لاغير’;
return returntxta;
}