翻訳と辞書
Words near each other
・ Asser Christelijke Voetbalvereniging
・ Asser Fagerström
・ Asser Kuveri Kapere
・ Asser Levy
・ Asser Levy Public Baths
・ Asser Mbai
・ Asser Salo
・ Asser Thorkilsson
・ Asser Wallenius
・ Asser Yassin
・ Asserbo Charterhouse
・ Asserbohus
・ Assert (horse)
・ Assert.h
・ Assertion
Assertion (software development)
・ Assertion definition language
・ Assertion Theory
・ Assertive community treatment
・ Assertive discipline
・ Assertiveness
・ Assertoric
・ Asses Ears
・ Asses Ears (Alaska)
・ Asses Ears (China)
・ Asses Ears (South Shetland Islands)
・ Asses of Face Destruction
・ Assesos
・ Assesse
・ Assessed Taxes Act 1840


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Assertion (software development) : ウィキペディア英語版
Assertion (software development)
In computer programming, an assertion is a statement that a predicate (Boolean-valued function, a true–false expression) is expected to always be true at that point in the code. If an assertion evaluates to false at run time, an assertion failure results, which typically causes the program to crash, or to throw an assertion exception.
== Details ==

The following code contains two assertions, x > 0 and x > 1, and they are indeed true at the indicated points during execution:
x = 1;
assert (x > 0);
x++;
assert (x > 1);
Programmers can use assertions to help specify programs and to reason about program correctness. For example, a precondition—an assertion placed at the beginning of a section of code—determines the set of states under which the programmer expects the code to execute. A postcondition—placed at the end—describes the expected state at the end of execution. For example: x > 0 x > 1
The example above uses the notation for including assertions used by C.A.R. Hoare in his 1969 paper.〔C.A.R. Hoare, (An axiomatic basis for computer programming ), ''Communications of the ACM'', 1969.〕 That notation cannot be used in existing mainstream programming languages. However, programmers can include unchecked assertions using the comment feature of their programming language. For example, in C:
x = 5;
x = x + 1;
//
The braces included in the comment help distinguish this use of a comment from other uses.
Libraries may provide assertion features as well. For example, in C using glibc with C99 support:
#include
x = 5;
x = x + 1;
assert(x > 1);
Several modern programming languages include checked assertions - statements that are checked at runtime or sometimes statically. If an assertion evaluates to false at run-time, an assertion failure results, which typically causes execution to abort. This draws attention to the location at which the logical inconsistency is detected and can be preferable to the behaviour that would otherwise result.
The use of assertions helps the programmer design, develop, and reason about a program.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Assertion (software development)」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.