What is a conditional statement?

In programming, it is important not only knowledge of languages, but also an understanding of what is responsible for what. This is necessary for the possibility of successful teamwork, and as part of the article you will learn what a condition operator is, why it is needed, what features are there. Also, switching and branching of the code for which it is applied will be outlined in general terms.

What is a conditional statement?

conditional operator




So (or, otherwise, a conditional branch instruction) is called the construction of a programming language. It provides the execution of a command or their set. But this is possible only when the condition of truthfulness of a certain logical expression is met or an instruction from the user (equipment operator) has been received for implementation.

General Description of Application

conditional operator in pascal




, ( ) , . . , .





« », 1878. , , . . , , . . , , «». if. , , , , . . ? :

  1. , . () : if then end. , . , , end. . , - , , - .
  2. , . : if then 1 else 2 end. , , . , , – . .
  3. . :

    if then

    else if , then

    else if then

    else , end

, . . , ( ), – .









""

conditional operator




, , . "" . – =, <, > . :

if >=

then

:=Sqr(-)

else

write ( );

?

programming conditional statement




? , . , , . , , , , , . .

conditional statement uses




, . , , , . , , , .

, "" "". , , , . , , , . , , . , . , . .

, , - , , . ? case, swithc .

, , . .

  1. . , .
  2. . . «», . .

conditional jump operator




. .




All Articles