StringToDouble
Bir sayının sembol temsilini içeren bir dizgiyi, double tipi bir sayıya dönüştürür.
double StringToDouble(
string value
);
|
Parametreler
value
[in] Bir sayının sembol temsilini içeren dizgi.
Dönüş değeri
Example:
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
//--- string to convert
string str = "12345.54321";
//--- convert the input string as a real number into a double type variable
double converted=StringToDouble(str);
//--- display the resulting number accurate to 8 decimal places in the journal
PrintFormat("The string '%s' is converted to the real number %.8f", str, converted);
/*
result:
The string '12345.54321' is converted to the real number 12345.54321000
*/
}
|
Ayrıca Bakınız
NormalizeDouble, Reel tipler (double, float), Tiplerin dönüşümü