SRL Archive - RS3 Help

if or/and


mitchell li

2014-08-19 11:18:33

How do you code if statements in simba to have and/or?
Is it similar to these?
if (a = b && c = d) then
if (a = b || c = d) then
Also what is the code for not equal?
Is it similar to this?
:=!

KeepBotting

2014-08-19 11:32:54

if x = 6 and y = 9 then
doThis;

if x = 42 or y = 0 then
doThis;

if not i = 1 then
doThis;

Olly

2014-08-19 15:07:14

not equal =
<>

rj

2014-08-19 15:20:43

2 different ways of doing not:

function bankOpen:boolean;
begin
result := false;
end;

begin
if (bankOpen <> true) then
writeln('hi');
end.


function bankOpen:boolean;
begin
result := false;
end;

begin
if (not bankOpen) then
writeln('hi');
end.