]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3type/ptrdiff_t.3type
dist.mk, All pages: .TH: Generate date at 'make dist'
[thirdparty/man-pages.git] / man3type / ptrdiff_t.3type
CommitLineData
e71c143c
AC
1.\" Copyright (c) 2020-2022 by Alejandro Colomar <colomar.6.4.3@gmail.com>
2.\" and Copyright (c) 2020 by Michael Kerrisk <mtk.manpages@gmail.com>
3.\"
4.\" SPDX-License-Identifier: Linux-man-pages-copyleft
5.\"
6.\"
ab47278f 7.TH PTRDIFF_T 3type (date) "Linux man-pages (unreleased)"
e71c143c
AC
8.SH NAME
9ptrdiff_t \- count of elements or array index
10.SH LIBRARY
11Standard C library
12.RI ( libc )
13.SH SYNOPSIS
14.nf
15.B #include <stddef.h>
16.PP
17.BR typedef " /* ... */ " ptrdiff_t;
18.fi
19.SH DESCRIPTION
20Used for a count of elements, or an array index.
21It is the result of subtracting two pointers.
2325c425 22It is a signed integer type
e71c143c
AC
23capable of storing values in the range
24.RB [ PTRDIFF_MAX ,
25.BR PTRDIFF_MAX ].
26.PP
27The length modifier for
28.I ptrdiff_t
29for the
30.BR printf (3)
31and the
32.BR scanf (3)
33families of functions is
34.BR t ,
35resulting commonly in
36.B %td
37or
38.B %ti
39for printing
40.I ptrdiff_t
41values.
3113c7f3 42.SH STANDARDS
801a509d 43C99 and later;
e71c143c
AC
44POSIX.1-2001 and later.
45.SH SEE ALSO
1971f613 46.BR size_t (3type)