|
more than 450 programs for free
|
![]() English |
![]() Slovensky |
![]() Česky |
![]() Šarišsky |
ConditionIF (logical expression) THEN command;If we are writing a program we cannot know how the commands are working - Answer of a user, non-function of printer. We must forecast all of these, and program must be reliable in this way. For this are tehere a CONDITIONS, which can furcate a program . In depending up to a condition, they make up some command, prepared for this situation. Full Condition:
IF (condition) THEN BEGIN
command; .. END ELSE BEGIN command; .. END Short form
IF (condition) THEN BEGIN
command; .. END; If is condition done, program start compliting commands between BEGIN and END.. If condition isn't done, there will be a acomplished a commands behind of ELSE. This commands are in a BODY of BEGIN and END. There are two important things. At 1st.: in a fulll condition behind 1st END, there aren't a ; , because before ELSE we cannot to write a ;. 2nd: We need to write BEGIN - END to the condition only if a condition body have only one command....If there are more then one command, you need to write a BEGIN - END. Logically expressions, conditions.Logically expressions are most used in programs, which are confronting two numbers or two and more variables. For the confrontation we have:
Other condition we can use a few connections - AND, OR, NOT. Nasledovná tabužka ukazuje jednoduché príklady.
<<Previous | Content | Next>> |
||||||||||||||||||||||||||||||||||||||||