.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Mon Mar 29 22:39:41 1993, David Metcalfe .\" Modified Sat Jul 24 21:38:42 1993, Rik Faith (faith@cs.unc.edu) .\" Modified Sun Dec 17 18:35:06 2000, Joseph S. Myers .\" .\" Traducido al castellano (con permiso) por: .\" Sebastian Desimone (chipy@argenet.com.ar) (desimone@fasta.edu.ar) .\" Translation revised April 30 1998 .\" Traducción revisada por Miguel Pérez Ibars el 1-enero-2005 .\" .TH ATOI 3 "17 diciembre 2000" "GNU" "Manual del Programador de Linux" .SH NOMBRE atoi, atol, atoll, atoq \- convierten una cadena en un entero .SH SINOPSIS .nf .B #include .sp .BI "int atoi(const char *" nptr ); .br .BI "long atol(const char *" nptr ); .br .BI "long long atoll(const char *" nptr ); .br .BI "long long atoq(const char *" nptr ); .fi .SH DESCRIPCIÓN La función \fBatoi()\fP convierte la porción inicial de la cadena apuntada por \fInptr\fP a .IR int. El comportamiento es el mismo que .sp .RS .B strtol(nptr, (char **)NULL, 10); .RE .sp excepto que \fBatoi()\fP no detecta errores. .PP Las funciones \fBatol()\fP y \fBatoll()\fP se comportan igual que \fBatoi()\fR, salvo que convierten la porción inicial de la cadena a \fIlong\fP y \fIlong long\fP respectivamente. \fBatoq()\fP es un nombre obsoleto para \fBatoll()\fP. .SH "VALOR DEVUELTO" El valor convertido. .SH "CONFORME A" SVID 3, POSIX.1, BSD 4.3, ISO/IEC 9899. ISO/IEC 9899:1990 (C89) y POSIX.1 (edición de 1996) incluyen las funciones \fBatoi()\fP y \fBatol()\fP solamente; C99 añade la función \fBatoll()\fP. .SH OBSERVACIONES La función no estándar \fBatoq()\fP no figura en la versión 4.6.27 de libc o en glibc 2, pero está presente en libc5 y la versión 4.7 de libc (aunque sólo como una función inline en \fB\fP hasta la versión 5.4.44 de libc). La función \fBatoll()\fP está presente en glibc 2 desde la versión 2.0.2, pero no lo está en libc4 ni libc5. .SH "VÉASE TAMBIÉN" .BR atof (3), .BR strtod (3), .BR strtol (3), .BR strtoul (3)