atof
De cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <stdlib.h>
|
||
| double atof( const char* str ); |
||
Interpreta un valor de punto flotante en una cadena de bytes que apunta
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.
Función descarta los espacios en blanco (según lo determinado por std::isspace()) hasta que primero no está en blanco se encuentra. Luego se toma como caracteres posible para formar una representación válida de punto flotante y los convierte en valor de punto flotante. El valor válido de coma flotante puede ser uno de los siguientes:
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.
- expresión decimal de coma flotante. Se compone de las siguientes partes: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.
- (opcional) más o el signo menosOriginal:(opcional) 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. - no vacío secuencia de dígitos decimales que contiene opcionalmente un carácter de punto decimal (define mantisa)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. - (opcional)
eoEseguido con menos opcionales o signo más y la secuencia no vacía de dígitos decimales (define exponente)Original:(opcional)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.
-
- expresión binaria de punto flotante. Se compone de las siguientes partes: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.
- (opcional) más o el signo menosOriginal:(opcional) 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 - no vacío secuencia de dígitos hexadecimales que contienen opcionalmente un carácter de punto decimal (define mantisa)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. - (opcional)
poPseguido con menos opcionales o signo más y la secuencia no vacía de dígitos hexadecimales (define exponente)Original:(opcional)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 expresión. Se compone de las siguientes partes: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.
- (opcional) más o el signo menosOriginal:(opcional) 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 mayúsculas y minúsculasOriginal:INForINFINITYignoring caseThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
-
- no-un número-expresión. Se compone de las siguientes partes: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.
- (opcional) más o el signo menosOriginal:(opcional) 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 de la parteNAN. Char_sequence' sólo puede contener caracteres alfanuméricos. El resultado es un tranquilo valor NaN punto flotante .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.
-
Contenido |
[editar] Parámetros
| str | - | puntero a la cadena terminada en null byte debe ser interpretado
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. |
[editar] Valor de retorno
double valor correspondiente al contenido de
str sobre el éxito. Si el valor convertido cae fuera del intervalo del tipo de retorno, el valor de retorno es indefinido. Si la conversión no se puede realizar, 0.0 se devuelve .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.
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] Ver también
| convierte una cadena de bytes en un valor de punto flotante 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. (función) | |
| C++ documentation for atof
| |