Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

What words are used to compare values?

Asked by 10 years ago

Can you provide an example script too? Thanks.

1 answer

Log in to vote
1
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

I'm not quite sure what you mean by 'word', but the comparison operators compare values...

val1 ~= val2 --True if val1 is not exactly the same as val2
val1 == val2 --True if val1 is exactly the same as val2
val1 <= val2 --True if val1 is less than or equal to val2
val1 >= val2 --True if val1 is greater than or equal to val2
val1 < val2 --True if val1 is less than val2
val1 > val2 --True if val1 is greater than val2

Each of these can be negated by the not operator, which is placed before the first operand (I.e. not val1 > val2).

0
Thanks. ScriptNHelper 5 — 10y
Ad

Answer this question