Difference between revisions of "~="

From WikiManual
Jump to: navigation, search
(creation)
 
m (update)
 
Line 1: Line 1:
'''<code>~=</code>''' and '''<code>!~=</code>''' are custom approximate equality operators. They are deprecated and of little use in writing bots but appear in evolved bots (as of version 2.42.9).
+
'''<code>~=</code>''' and '''<code>!~=</code>''' are custom approximate equality operators. They are deprecated and of little use in writing bots but appear in evolved bots (as of version 2.43).
  
 
<code>a b c ~=</code> places true on the condition [[stack]] whenever ''b'' is within ''c'' % of ''a''
 
<code>a b c ~=</code> places true on the condition [[stack]] whenever ''b'' is within ''c'' % of ''a''

Latest revision as of 23:43, 26 January 2007

~= and !~= are custom approximate equality operators. They are deprecated and of little use in writing bots but appear in evolved bots (as of version 2.43).

a b c ~= places true on the condition stack whenever b is within c % of a !~= returns the opposite of ~= and is equivalent to ~= not.

Example
50 150 200 ~= is true and 50 151 200 ~= is false

Logical Comparison Operators:

> <
>= <=
= !=
%= !%=
~= !~=