.\" -*- coding: UTF-8 -*- '\" t .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" Modified Sat Jul 24 21:42:42 1993 by Rik Faith .\" Modified Tue Oct 22 23:44:11 1996 by Eric S. Raymond .\" Modified Thu Jun 2 23:44:11 2016 by Nikos Mavrogiannopoulos .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH assert 3 "5 Febrero 2023" "Páginas de manual de Linux 6.03" .SH NOMBRE assert \- aborta el programa si la expresión es falsa .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBvoid assert(scalar \fP\fIexpression\fP\fB);\fP .fi .SH DESCRIPCIÓN This macro can help programmers find bugs in their programs, or handle exceptional cases via a crash that will produce limited debugging output. .PP If \fIexpression\fP is false (i.e., compares equal to zero), \fBassert\fP() prints an error message to standard error and terminates the program by calling \fBabort\fP(3). The error message includes the name of the file and function containing the \fBassert\fP() call, the source code line number of the call, and the text of the argument; something like: .PP .in +4n .EX prog: some_file.c:16: some_func: Assertion \`val == 0\[aq] failed. .EE .in .PP If the macro \fBNDEBUG\fP is defined at the moment \fI\fP was last included, the macro \fBassert\fP() generates no code, and hence does nothing at all. It is not recommended to define \fBNDEBUG\fP if using \fBassert\fP() to detect error conditions since the software may behave non\-deterministically. .SH "VALOR DEVUELTO" No se devuelve ningún valor. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .ad l .nh .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ \fBassert\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .hy .ad .sp 1 .SH ESTÁNDARES POSIX.1\-2001, POSIX.1\-2008, C99. .SH ERRORES \fBassert\fP() es implementada como un macro; si la expresión comprobada tiene efectos laterales, el comportamiento del programa puede ser diferente dependiendo de si \fBNDEBUG\fP está definida o no. Esto puede crear fallos indeterminados (Heisenbugs) que no se dan cuando la depuración está activada. .SH "VÉASE TAMBIÉN" \fBabort\fP(3), \fBassert_perror\fP(3), \fBexit\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Sebastian Desimone , Carlos Costa Portela y Miguel Pérez Ibars . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .