File: assert.3

package info (click to toggle)
manpages-pl 1%3A0.6-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 20,896 kB
  • ctags: 7
  • sloc: sh: 112; makefile: 59; perl: 32
file content (88 lines) | stat: -rw-r--r-- 4,282 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
.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
.\" %%%LICENSE_START(VERBATIM)
.\" 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.
.\" %%%LICENSE_END
.\"
.\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond <esr@thyrsus.com>
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\" This file is distributed under the same license as original manpage
.\" Copyright of the original manpage:
.\" Copyright © 1993 Thomas Koenig 
.\" Copyright © of Polish translation:
.\" Adam Byrtek (PTM) <abyrtek@priv.onet.pl>, 1998.
.\" Andrzej Krzysztofowicz (PTM) <ankry@mif.pg.gda.pl>, 2003.
.\" Robert Luberda <robert@debian.org>, 2013.
.\" Michał Kułach <michal.kulach@gmail.com>, 2014.
.TH ASSERT 3 2013\-09\-26 GNU "Podręcznik programisty Linuksa"
.SH NAZWA
assert \- przerwanie pracy programu, jeśli wyrażenie jest fałszywe
.SH SKŁADNIA
.nf
\fB#include <assert.h>\fP
.sp
\fBvoid assert(scalar \fP\fIwyrażenie\fP\fB);\fP
.fi
.SH OPIS
Jeśli w momencie ostatniego włączenia pliku \fI<assert.h>\fP jest
zdefiniowane makro \fBNDEBUG\fP, to makro \fBassert\fP() nie generuje żadnego
kodu, więc w ogóle nic nie robi. W przeciwnym przypadku makro \fBassert\fP()
wypisuje komunikat na standardowym wyjściu błędów i przerywa pracę programu
przez wywołanie \fBabort\fP(3) jeśli \fIwyrażenie\fP jest fałszywe (to jest równe
zeru).
.LP
Celem istnienia tego makra jest pomoc programistom w znalezieniu usterek w
ich programach. Komunikat "assertion failed in file foo.c, function
do_bar(), line 1287" jest bezużyteczny dla użytkownika.
.SH "WARTOŚĆ ZWRACANA"
Nie jest zwracana żadna wartość.
.SH "ZGODNE Z"
.\" See Defect Report 107 for more details.
POSIX.1\-2001, C89, C99. W C89 \fIwyrażenie\fP musi być typu \fIint\fP, w
przeciwnym wypadku zachowanie funkcji jest nieokreślone, jednakże w C99 może
być dowolnego typu skalarnego.
.SH BŁĘDY
\fBassert\fP() jest zaimplementowane jako makro. Jeśli testowane wyrażenie ma
jakieś efekty uboczne, zachowanie programu będzie różne w zależności od
tego, czy zdefiniowano makrodefinicję \fBNDEBUG\fP. Może to prowadzić do
Heisenbugów [patrz: http://pl.wikipedia.org/wiki/Heisenbug \- przyp.tłum.],
które nie występują przy włączonym odpluskwianiu.
.SH "ZOBACZ TAKŻE"
\fBabort\fP(3), \fBassert_perror\fP(3), \fBexit\fP(3)
.SH "O STRONIE"
Angielska wersja tej strony pochodzi z wydania 3.71 projektu Linux
\fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów, oraz
najnowszą wersję oryginału można znaleźć pod adresem
\%http://www.kernel.org/doc/man\-pages/.
.SH TŁUMACZENIE
Autorami polskiego tłumaczenia niniejszej strony podręcznika man są:
Adam Byrtek (PTM) <abyrtek@priv.onet.pl>,
Andrzej Krzysztofowicz (PTM) <ankry@mif.pg.gda.pl>,
Robert Luberda <robert@debian.org>
i
Michał Kułach <michal.kulach@gmail.com>.
.PP
Polskie tłumaczenie jest częścią projektu manpages-pl; uwagi, pomoc, zgłaszanie błędów na stronie http://sourceforge.net/projects/manpages-pl/. Jest zgodne z wersją \fB 3.71 \fPoryginału.