Shatterhand
2012-04-04 14:15:37
if (function_A or function_B) then
DoSomething;
NextCommand; If function_A returns with True, will function_B be skipped or not?
2012-04-04 14:15:37
if (function_A or function_B) then
DoSomething;
NextCommand; If function_A returns with True, will function_B be skipped or not?
2012-04-04 14:45:41
function One : boolean;
begin
result := false;
Writeln('One ran');
end;
function Two : boolean;
begin
result := true;
Writeln('Two ran');
end;
begin
if One or Two then
Writeln('Expression is true');
Writeln('Next');
end.Edit: You should use a more descriptive title next time as I almost skipped it :).function One : boolean;
begin
result := false;
Writeln('One ran');
end;
function Two : boolean;
begin
result := true;
Writeln('Two ran');
end;
begin
if One and (Two or One) then
Writeln('Expression is true');
Writeln('Next');
end.
2012-04-04 15:20:38
function One : boolean;
begin
result := True;
Writeln('One ran');
end;
function Two : boolean;
begin
result := False;
Writeln('Two ran');
end;
begin
if One or Two then
Writeln('Expression is true');
Writeln('Next');
end.One ran
Expression is true
Next2012-04-04 15:50:54
function One : boolean;
begin
result := true;
Writeln('One ran');
end;
function Two : boolean;
begin
result := false;
Writeln('Two ran');
end;
begin
if not One and (Two or One) then
Writeln('Expression is true');
Writeln('Next');
end.