If...then

In an If....then statement, can you extent the if then so that it carry out taks in a specific order like for example:

if 2>3 then 3:=a and 2:=b else
if 3>2 then 2:=a and 3:=b;

Comments

  • : In an If....then statement, can you extent the if then so that it carry out taks in a specific order like for example:
    :
    : if 2>3 then 3:=a and 2:=b else
    : if 3>2 then 2:=a and 3:=b;
    :
    the example you provided contains several errors, but yes it is possible to string together any number of if-then-else statements. Here is a slightly changed code:
    [code]
    if a < b then
    begin
    a := 3;
    b := 2;
    end else
    if a > b then
    begin
    a := 2;
    b := 3;
    end;
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion