I always thought that assert is just an error function, in fact, it is actually a macro, and the role is not "error."After a certain understanding of its role and use of a certain understanding of the use of assert () is like a "contractual
Assert is used to determine the correctness of the program running and ensure that the program running behavior is consistent with what we understand. The call form is assert (logic expression). If the logic expression is false, abort () is called
I always thought that assert is just an error function, in fact, it is actually a macro, and the role is not "error." After a certain understanding of its role and use of a certain understanding of the use of assert () is like a "contractual
The stereotype of an Assert macro is defined in , which terminates the execution of the program if its condition returns an error, and the prototype defines:#include void assert (int expression);
The function of assert is to calculate the
Assert is a new feature introduced in j2se1.4. assertion is a Boolean State included in the Code. Programmers think this state is true. Generally, assert checks program security during development and generally does not use assert during release.
Assert () function usage Summary (recommended), assert Function
The assert macro prototype is defined inIf its condition returns an error, terminate the program execution. The prototype is defined as follows:
#include void assert( int expression
The assert macro prototype is defined in . Its function is to terminate a condition if an error is returned.ProgramExecution, prototype definition:
# Include Void assert (INT expression );
Assert is used to calculate the expression. If its value
The prototype of an Assert macro is defined in , and its function is to terminate the program execution if its condition returns an error.Library functions: Assert.hPrototype definition: void assert (int expression);The function of an assert is to
Today, I saw a very popular post on javaeye. The question is (interview): whether to use exception (exception) or if to judge http://www.javaeye.com/topic/745640. The content is probably:
When the parameter is invalid, is it true that if else
http://blog.csdn.net/dongyonggan/article/details/5780979Usage: ASSERT (expression)If False, the assert generates an eassertionfailed exception that is displayed asAssertion Failed (C:/src/unit1.pas, [Size=+0]line 34)If you do not want to use these
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.