if <condition> then
   statement block
else if <condition> then
   .
   .
   .
else
   statement block
The condition takes the form:
[boolean expression (AND|OR) [NOT] boolean expression ...]
and this can go on for a long time. For instance you could have a condition:
if (i = 1) and (j <= 3) or not (k <> 0) then
   statement block
Note : (not k <> 0) is the same as (k = 0).
Now here is an example program:
program security;
uses crt;
var
   input : String;
begin
   clrscr;
   writeln('Enter the password');
   readln(input);
   if (input = 'Pascal') then
      writeln('Pascal is easy!')
       {Note no semicolon for one line}
   else if (input = 'Basic') then
   begin
      writeln('Basic is not');
      writeln('very hard!');
   end
   else
      writeln('Wrong password!');
end.
eg:
label label1;
begin
   .
   .
   .
   label1:
   {Note the colon!}
   .
   .
   .
   goto label1;
   {Note no colon}
   .
   .
   .
end.
And so on. This is really cumbersome and annoying (you have to type the
same thing over and over). So what you want to use is the case
statement. The above example would be done like so:if i = 0 then
...
else if i = 1 then
...
else if i = 2 then
case i of
0:...
1:...
2:...
3:...
4:...
5:...
6:...
end;Halt
This does the simple task of ending your program.
Exit
This command exits from the current procedure/function.
Break
This command exits from the current loop.