CODE:string number[7] = {"786.3k", "96.3k", "817.1K", "93.8K", "1.0M", "1.3m", "1.5m"};
int result = Compare();
messagebox(result);
function Compare()
{
int min = 2147000000;
int num;
string temp;
for(int i=0; i<sizearray(number)-1; i++)
{
if(regexreplace(1, #temp, number[i], "k", "", IGNORECASE)) num = formatsn(temp) * 1000;
else
{
if(regexreplace(1, #temp, number[i], "m", "", IGNORECASE)) num = formatsn(temp) * 1000000;
else num = formatsn(temp);
}
if(num<min) min = num;
}
return min;
}
Для распознавания чисел используйте функцию readtext. |