<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: What is the difference between 'assignment' and 'equality' operators in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13873451#M29225</link>
    <description>&lt;P&gt;Fortunately you must not write now (a === b)&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Oct 2025 12:48:02 GMT</pubDate>
    <dc:creator>istan</dc:creator>
    <dc:date>2025-10-30T12:48:02Z</dc:date>
    <item>
      <title>What is the difference between 'assignment' and 'equality' operators</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13872781#M29223</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Learning max script with help of "Script help documentation"&lt;/P&gt;&lt;P&gt;In FAQ s came across this question&amp;nbsp;&lt;/P&gt;&lt;P&gt;"What is the difference between 'assignment' and 'equality' operators'&lt;/P&gt;&lt;P&gt;While evaluating in listener and editor both codes give same result&lt;/P&gt;&lt;P&gt;not throwing any error in the first case when " if a = 0 " is written instead of " a ==0"&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;TYPICAL ERROR:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;   a &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;
   &lt;SPAN class=""&gt;if&lt;/SPAN&gt;&lt;SPAN class=""&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt; &lt;SPAN class=""&gt;then&lt;/SPAN&gt; &lt;SPAN class=""&gt;print&lt;/SPAN&gt; &lt;SPAN class=""&gt;"A is Zero!"&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;print&lt;/SPAN&gt; &lt;SPAN class=""&gt;"A is not Zero!"&lt;/SPAN&gt;
   &lt;SPAN class=""&gt;--&lt;/SPAN&gt; &lt;SPAN class=""&gt;Type&lt;/SPAN&gt;&lt;SPAN class=""&gt; error&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;if&lt;/SPAN&gt;&lt;SPAN class=""&gt;-&lt;/SPAN&gt;&lt;SPAN class=""&gt;test requires &lt;/SPAN&gt;&lt;SPAN class=""&gt;BooleanClass&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN class=""&gt; got&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;STRONG&gt;CORRET CODE:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;   a &lt;/SPAN&gt;&lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;1&lt;/SPAN&gt;
   &lt;SPAN class=""&gt;if&lt;/SPAN&gt;&lt;SPAN class=""&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt; &lt;SPAN class=""&gt;then&lt;/SPAN&gt; &lt;SPAN class=""&gt;print&lt;/SPAN&gt; &lt;SPAN class=""&gt;"A is Zero!"&lt;/SPAN&gt; &lt;SPAN class=""&gt;else&lt;/SPAN&gt; &lt;SPAN class=""&gt;print&lt;/SPAN&gt; &lt;SPAN class=""&gt;"A is not Zero!"&lt;/SPAN&gt;
   &lt;SPAN class=""&gt;--&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;"A is not Zero!"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 30 Oct 2025 04:17:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13872781#M29223</guid>
      <dc:creator>dvgbaokar</dc:creator>
      <dc:date>2025-10-30T04:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between 'assignment' and 'equality' operators</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13873085#M29224</link>
      <description>&lt;P&gt;1.) a = 0 is an assignment in MAXScript, i.e. "store the value 0 in the variable a"&lt;/P&gt;
&lt;P&gt;2.) a == 0 is an equality comparison, i.e. "check whether a contains the value zero"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you are right!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MAXScript no longer complains about&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if a=0 then ( ... )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also simply write&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;0==false&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and get "true" as result, without an error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure when this was changed! It used to throw an error, but now it seems to do the same many other programming languages do:&lt;/P&gt;
&lt;P&gt;It will use "0" as equivalent to "false"...&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 08:44:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13873085#M29224</guid>
      <dc:creator>MartinBeh</dc:creator>
      <dc:date>2025-10-30T08:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is the difference between 'assignment' and 'equality' operators</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13873451#M29225</link>
      <description>&lt;P&gt;Fortunately you must not write now (a === b)&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 12:48:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/what-is-the-difference-between-assignment-and-equality-operators/m-p/13873451#M29225</guid>
      <dc:creator>istan</dc:creator>
      <dc:date>2025-10-30T12:48:02Z</dc:date>
    </item>
  </channel>
</rss>

