Guard (computer science)
In computer programming, a guard is a boolean expression that must evaluate to true if the program execution is to continue in the branch in question. Regardless of which programming language is used, guard clause, guard code, or guard statement, is a check of integrity preconditions used to avoid errors during execution. A typical example is checking that a reference about to be processed is not null, which avoids null-pointer failures. Other uses include using a boolean field for idempotence (so subsequent calls are nops), as in the dispose pattern. The guard provides an early exit from a subroutine, and is a commonly used deviation from structured programming, removing one level of nesting and resulting in flatter code: replacing if guard { ... } with if not guard: return; ....
Wikipage disambiguates
Clean (programming language)Concurrent constraint logic programmingConcurrent logic programmingConstraint Handling RulesDirect functionDispose patternEdsger W. DijkstraFilter (higher-order function)GuardGuard (computing)Guard clauseGuard patternGuard statementGuard statementsGuarded suspensionInline cachingKent Recursive CalculatorLogic programmingMerge (SQL)Occam (programming language)Pattern guardPattern matchingPreconditionPromelaReturn statementStructured programmingSwift (programming language)Tracing just-in-time compilationUmpleΠ-calculus
Link from a Wikipage to another Wikipage
primaryTopic
Guard (computer science)
In computer programming, a guard is a boolean expression that must evaluate to true if the program execution is to continue in the branch in question. Regardless of which programming language is used, guard clause, guard code, or guard statement, is a check of integrity preconditions used to avoid errors during execution. A typical example is checking that a reference about to be processed is not null, which avoids null-pointer failures. Other uses include using a boolean field for idempotence (so subsequent calls are nops), as in the dispose pattern. The guard provides an early exit from a subroutine, and is a commonly used deviation from structured programming, removing one level of nesting and resulting in flatter code: replacing if guard { ... } with if not guard: return; ....
has abstract
En informatique, une garde est ...... ion de liste parmi les gardes.
@fr
In computer programming, a gua ...... sion clauses among the guards.
@en
Варта — , який призначений для ...... [1..(n - 1)], n `mod` x == 0]
@uk
Охра́на (охраня́ющее выраже́ни ...... я (например, Haskell, Erlang).
@ru
ガード (Guard) とは、コンピュータ・プログラミング言 ...... てはスキップさせることが可能なパターンのようなもの、である。
@ja
在计算机程序设计中,卫(guard)是布尔表达式,其结果必须 ...... 得释放资源操作成为幂等运算,即多次释放资源等效于只释放一次。
@zh
Link from a Wikipage to an external page
Wikipage page ID
page length (characters) of wiki page
Wikipage revision ID
960,237,811
Link from a Wikipage to another Wikipage
wikiPageUsesTemplate
comment
En informatique, une garde est ...... lles sont appelées conditions.
@fr
In computer programming, a gua ...... ith if not guard: return; ....
@en
Варта — , який призначений для ...... [1..(n - 1)], n `mod` x == 0]
@uk
Охра́на (охраня́ющее выраже́ни ...... я (например, Haskell, Erlang).
@ru
ガード (Guard) とは、コンピュータ・プログラミング言 ...... てはスキップさせることが可能なパターンのようなもの、である。
@ja
在计算机程序设计中,卫(guard)是布尔表达式,其结果必须 ...... 得释放资源操作成为幂等运算,即多次释放资源等效于只释放一次。
@zh
label
Garde (informatique)
@fr
Guard (computer science)
@en
Варта (програмування)
@uk
Охрана (программирование)
@ru
ガード (プログラミング)
@ja
卫语句
@zh