File: strtol.3

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (89 lines) | stat: -rw-r--r-- 3,535 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.\"WORD: base 
.\" 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 Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610
.\"
.\" Japanese Version Copyright (c) 1999 AKAMATSU, Kazuo
.\"         all rights reserved.
.\" Translated Thu Jan 9 21:00:00 JST 1999
.\"         by AKAMATSU, Kazuo
.\" Updated Sun Apr 8 18:07:50 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\"
.TH STRTOL 3  "10 June 1995" "GNU" "Linux Programmer's Manual"
.SH ̾
strtol \- ʸ long int Ѵ
.SH 
.nf
.B #include <stdlib.h>
.sp
.BI "long int strtol(const char *" nptr ", char **" endptr ", int " base );
.fi
.SH 
\fBstrtol()\fP ؿ \fInptr\fP ʸ \fIbase\fP Ȥ
long int Ѵ롣 \fIbase\fP  2  36 ޤǤ
뤤̤ʰ̣ 0 ()ǤʤФʤʤ
.PP
ʸƬˤϡǤդο (
.BR isspace (3)
) 򤬤äƤ褯ޤľˤ `+'  `-' 
Ƥ褤 \fIbase\fP ޤ 16 ξˤϡ `0x' ǤϤޤ
ʸ 16 ʿȤư롣ʳʸФ \fIbase\fP 
ξϡ `0' ǻϤޤʸ 8 ʿȤơ
ʳʸ 10 ʿȤư롣
.PP
ɽʸ long int Ѵ뤬Ф
ͭǤʤ줿ѴϽλ롣(11 ʿʾǤ `A' 
ʸʸ˴ؤ餺 10 ɽ `B'  11 ɽ
ʲƱͤˡ `Z'  35 ɽ)
.PP
\fIendptr\fP ̥ (NULL) Ǥʤϡǽ˸줿ʸ
\fBstrtol()\fP ˤä \fI*endptr\fP ¸Ƥ롣
ʸͭʿҤȤĤʤС \fBstrtol()\fP  \fInptr\fP
θͤ \fI*endptr\fP ( 0 ֤)
äˡ\fI*nptr\fP  `\\0' ʳǡᤵ줿 \fI**endptr\fP  `\\0'
ʤСʸΤͭäȤˤʤ롣
.SH ֤
Ѵ줿֤ͤ롣Сեˤ LONG_MAX ֤졢
եˤ LONG_MIN ֤롣Сե
եΤξˤ
ѿ \fIerrno\fP ˤ ERANGE ꤵ롣
.SH 顼
.TP
.B ERANGE
ʸϿͤɽϰϳǤꡢѴͤ LONG_MAX ޤ LONG_MIN 
ꤵƤ롣
.SH 
SVID 3, BSD 4.3, ISO 9899
.SH Ϣ
.BR atof (3),
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
.BR strtoul (3)
.SH Х
ߤΥ򻲾Ȥʤ