Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
10 user(s) are online (10 user(s) are browsing encyclopedia)

Members: 0
Guests: 10

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Conditional branch

A conditional branch is a basic logical structure. It resembles a fork in the road; there are at least two paths that may be taken and one must be chosen.

This is a common method in computer programming. If a certain condition exists (e.g., the hard disk drive is in use), then the application will perform one action (in this case, it might wait), whereas if this condition does not exist the application will perform another action (proceed to read from or write to the hard disk).

Conditional statements can be assessed based on any number of data, including: *resource availability (semaphores, Mutual exclusiones) *environmental characteristics (operating system, available APIs or libraries, other processes) *internal Variables such as the result of a previous calculation or the setting of a state flag

Conditional branches are often issued in speculative execution, primarily because there is no simple solution to predict which branch will be selected when the condition is evaluated. Branches where the results of the conditional statement affect the outcome of the branch s execution are particularly difficult because they cannot be executed speculatively at all in a strict programming language (C_programming_language, C plus plus, Java_programming_language, BASIC_programming_language, Fortran, and others) without substantial effort on the part of the programmer to allow for it. Since these languages form the bulk of existing commercial applications, the efficient use and executive optimization of branches is an important concern for many programmers working on Application_software, Compilers, and Central processing unit architectures.

=See also=

  • Branch prediction