Operators in X3
Logical Operators:
codeExplainvar a = 5
var b = 10
if a > 0 and b > 0 then
show("Both 'a' and 'b' are positive.")
end
if a == 5 or b == 5 then
show("At least one of 'a' or 'b' is equal to 5.")
end
if not (a < 0) then
show("'a' is not negative.")
endComparison Operators:
codeExplainif a == b then
show("'a' is equal to 'b'.")
end
if a != b then
show("'a' is not equal to 'b'.")
end
if a < b then
show("'a' is less than 'b'.")
end
if a >= b then
show("'a' is greater than or equal to 'b'.")
endCombining Conditions:
Last updated