Definition

In programming, conditional expressions are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.
The if–then-else construct is common across many programming languages. Although the syntax varies quite a bit from language to language, the basic structure (in pseudo-code) looks like this:

If (boolean condition) Then
-- do some stuff
Else
-- do other stuff
End If

When an interpreter finds an If, it expects a boolean condition – for example, x > 0, which means "the variable x contains a number that is greater than zero" – and evaluates that condition. If the condition is true, the statements following the “then” are executed. Otherwise, the execution continues in the following branch – either in the else block (which is usually optional), or if there is no else branch, then after the end If.

Definition

In programming, conditional expressions are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.
The if–then-else construct is common across many programming languages. Although the syntax varies quite a bit from language to language, the basic structure (in pseudo-code) looks like this:

If (boolean condition) Then
-- do some stuff
Else
-- do other stuff
End If

When an interpreter finds an If, it expects a boolean condition – for example, x > 0, which means "the variable x contains a number that is greater than zero" – and evaluates that condition. If the condition is true, the statements following the “then” are executed. Otherwise, the execution continues in the following branch – either in the else block (which is usually optional), or if there is no else branch, then after the end If.

Definition

In programming, conditional expressions are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false.
The if–then-else construct is common across many programming languages. Although the syntax varies quite a bit from language to language, the basic structure (in pseudo-code) looks like this:

If (boolean condition) Then
-- do some stuff
Else
-- do other stuff
End If

When an interpreter finds an If, it expects a boolean condition – for example, x > 0, which means "the variable x contains a number that is greater than zero" – and evaluates that condition. If the condition is true, the statements following the “then” are executed. Otherwise, the execution continues in the following branch – either in the else block (which is usually optional), or if there is no else branch, then after the end If.

Author

Mateus Loubach

Follow us on

Send us a message

Related Glossary

Citizen Developer

Citizen Developer

Citizen Developer

CRM

CRM

CRM

Cloud Storage

Cloud Storage

Cloud Storage

© 2024 mateusloubach. Exclusive rights retained.

Built by MATEUSLOUBACH

© 2023 Goodspeed. All rights reserved.