Assertions - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Assertions.

Assertions - Research Article from World of Computer Science

This encyclopedia article consists of approximately 2 pages of information about Assertions.
This section contains 457 words
(approx. 2 pages at 300 words per page)
Buy the Assertions Encyclopedia Article

An assertion is a code that functions as a signal to establish whether a condition that should be true is indeed true. Thus, assertions are Boolean expressions (expressions that yield a value that are either true or false). If a condition is not true--and so the assertion has been violated--the program is interrupted.

Assertions are useful tools that aid in the software debugging process. Debugging is the checking of software for flaws in its implementation and the correction of flaws that are discovered.

Assertions should be used whenever possible in the writing of code. For example, if a piece of code is written that has preconditions (conditions that need to be met for the algorithm to be valid), or post conditions (conditions that will be true if the algorithm is correct), then it is prudent to use assertions to verify the preconditions and postconditions. The need for assertions...

(read more)

This section contains 457 words
(approx. 2 pages at 300 words per page)
Buy the Assertions Encyclopedia Article
Copyrights
Gale
Assertions from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.