std::atof
Da cppreference.com.
|
|
Questa pagina è stata tradotta in modo automatico dalla versione in ineglese della wiki usando Google Translate.
La traduzione potrebbe contenere errori e termini strani. Muovi il puntatore sopra al testo per vedere la versione originale. Puoi aiutarci a correggere gli gli errori. Per ulteriori istruzioni clicca qui. |
<metanoindex/>
<tbody> </tbody>| Elemento definito nell'header <cstdlib>
|
||
double atof( const char *str ); |
||
Interpreta un valore in virgola mobile in una stringa di byte puntato da
str.Original:
Interprets an floating point value in a byte string pointed to by
str.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Funzione scarta eventuali spazi bianchi (come determinato dal
std::isspace()) fino al primo carattere non-spazio si trova. Poi ci vuole come numero possibile di caratteri in modo da formare una valida rappresentazione in virgola mobile e li converte in valore in virgola mobile. Il valore di virgola mobile valido può essere uno dei seguenti:Original:
Function discards any whitespace characters (as determined by
std::isspace()) until first non-whitespace character is found. Then it takes as many characters as possible to form a valid floating point representation and converts them to floating point value. The valid floating point value can be one of the following:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
- espressione decimale in virgola mobile. Si compone delle seguenti parti:Original:decimal floating point expression. It consists of the following parts:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- (opzionale) più o segno menoOriginal:(opzionale) plus or minus signThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - sequenza non vuota di cifre decimali eventualmente contenenti un carattere punto decimale (definisce significante)Original:nonempty sequence of decimal digits optionally containing a decimal point character (defines significand)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - (opzionale)
eoEseguito con meno opzionali o segno più e la sequenza non vuota di cifre decimali (definisce esponente)Original:(opzionale)eorEfollowed with optional minus or plus sign and nonempty sequence of decimal digits (defines exponent)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- binario espressione virgola mobile. Si compone delle seguenti parti:Original:binary floating point expression. It consists of the following parts:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- (opzionale) più o segno menoOriginal:(opzionale) plus or minus signThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. 0xor0X- sequenza non vuota di cifre esadecimali eventualmente contenenti un carattere punto decimale (definisce significante)Original:nonempty sequence of hexadecimal digits optionally containing a decimal point character (defines significand)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. - (opzionale)
poPseguito con meno opzionali o segno più e la sequenza non vuota di cifre esadecimali (definisce esponente)Original:(opzionale)porPfollowed with optional minus or plus sign and nonempty sequence of hexadecimal digits (defines exponent)The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- infinito espressione. Si compone delle seguenti parti:Original:infinity expression. It consists of the following parts:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- (opzionale) più o segno menoOriginal:(opzionale) plus or minus signThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. INFoINFINITYignorando casoOriginal:INForINFINITYignoring caseThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- not-a-numero di espressione. Si compone delle seguenti parti:Original:not-a-number expression. It consists of the following parts:The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
- (opzionale) più o segno menoOriginal:(opzionale) plus or minus signThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions. NANoNAN(char_sequence)ignorando caso della parteNAN. Char_sequence' può contenere solo caratteri alfanumerici. Il risultato è un tranquillo punto di valore NaN mobile.Original:NANorNAN(char_sequence)ignoring case of theNANpart. char_sequence can only contain alphanumeric characters. The result is a quiet NaN floating point value.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Parametri
| str | - | puntatore alla stringa con terminazione null byte da interpretare
Original: pointer to the null-terminated byte string to be interpreted The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
Valore di ritorno
double valore corrispondente al contenuto di str sul successo. Se il valore convertito cade nell'intervallo del tipo di ritorno, il valore restituito non è definito. Se la conversione non può essere eseguita, viene restituito 0.0.Original:
double value corresponding to the contents of str on success. If the converted value falls out of range of the return type, the return value is undefined. If no conversion can be performed, 0.0 is returned.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Esempio
| This section is incomplete Reason: no example |
Vedi anche
converte una stringa di byte in un valore in virgola mobile Original: converts a byte string to a floating point value The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (funzione) | |
C documentation for atof
| |