File: ptrdiff_t.3type

package info (click to toggle)
manpages 6.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,184 kB
  • sloc: sh: 575; python: 222; perl: 190; makefile: 29; lisp: 22
file content (45 lines) | stat: -rw-r--r-- 870 bytes parent folder | download | duplicates (2)
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
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.TH ptrdiff_t 3type 2025-05-17 "Linux man-pages (unreleased)"
.SH NAME
ptrdiff_t \- count of elements or array index
.SH LIBRARY
Standard C library
.RI ( libc )
.SH SYNOPSIS
.nf
.B #include <stddef.h>
.P
.BR typedef " /* ... */  " ptrdiff_t;
.fi
.SH DESCRIPTION
Used for a count of elements, or an array index.
It is the result of subtracting two pointers.
It is a signed integer type
capable of storing values in the range
.RB [ PTRDIFF_MIN ,
.BR PTRDIFF_MAX ].
.P
The length modifier for
.I ptrdiff_t
for the
.BR printf (3)
and the
.BR scanf (3)
families of functions is
.BR t ,
resulting commonly in
.B %td
or
.B %ti
for printing
.I ptrdiff_t
values.
.SH STANDARDS
C11, POSIX.1-2008.
.SH HISTORY
C89, POSIX.1-2001.
.SH SEE ALSO
.BR size_t (3type)