Zilog ZUSBOPTS Manuel d'utilisateur Page 439

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 520
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 438
UM017105-0511 Standard Functions
Zilog Developer Studio II – ZNEO™
User Manual
411
Example
char str []="1.234";
double x;
x= atof(str);
atoi
Converts the string pointed to by nptr to int representation. Except for the behavior on
error, it is equivalent to
(int)strtol(nptr, (char **)NULL, 10).
Synopsis
#include <stdlib.h>
int atoi(const char *nptr);
Returns
The converted value.
Example
char str []="50";
int x;
x=atoi(str);
atol
Converts the string pointed to by nptr to long int representation. Except for the behavior
on error, it is equivalent to
strtol(nptr, (char **)NULL, 10).
Synopsis
#include <stdlib.h>
long int atol(const char *nptr);
Returns
The converted value.
Example
char str[]="1234567";
long int x;
x=atol(str);
Vue de la page 438
1 2 ... 434 435 436 437 438 439 440 441 442 443 444 ... 519 520

Commentaires sur ces manuels

Pas de commentaire