<?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: Int() problem in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498684#M38588</link>
    <description>You guys are great!! Silly me. &lt;BR /&gt;
&lt;BR /&gt;
Thanks,!!</description>
    <pubDate>Thu, 01 Dec 2005 14:35:03 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-12-01T14:35:03Z</dc:date>
    <item>
      <title>Int() problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498680#M38584</link>
      <description>i am writing code for convert inch to feet. In my code:&lt;BR /&gt;
&lt;BR /&gt;
feet = Fix(InchesInput \ 12)&lt;BR /&gt;
&lt;BR /&gt;
the code works fine, except when it comes 11'-11 1/2" (143.5 inches) or 9'-11 1/2" (119.5 inches) etc (as long as 11 1/2"), the result becomes&lt;BR /&gt;
&lt;BR /&gt;
feet = Fix(119.5\12) = 10??? (instead of 9!!!)&lt;BR /&gt;
feet = Fix(143.5\12) = 12??? (instead of 11!!!)&lt;BR /&gt;
&lt;BR /&gt;
How come?? Any suggestion??&lt;BR /&gt;
&lt;BR /&gt;
thanks,</description>
      <pubDate>Wed, 30 Nov 2005 22:13:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498680#M38584</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-30T22:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Int() problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498681#M38585</link>
      <description>stab in the dark.. (new to vba, and not tested)&lt;BR /&gt;
&lt;BR /&gt;
but.. why have the "fix" at all?.. does that not round off your result?</description>
      <pubDate>Wed, 30 Nov 2005 22:30:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498681#M38585</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-30T22:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Int() problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498682#M38586</link>
      <description>CRiZ wrote:&lt;BR /&gt;
&amp;gt; i am writing code for convert inch to feet. In my code:&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; feet = Fix(InchesInput \ 12)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; the code works fine, except when it comes 11'-11 1/2" (143.5 inches) or 9'-11 1/2" (119.5 inches) etc (as long as 11 1/2"), the result becomes&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; feet = Fix(119.5\12) = 10??? (instead of 9!!!)&lt;BR /&gt;
&amp;gt; feet = Fix(143.5\12) = 12??? (instead of 11!!!)&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; How come?? Any suggestion??&lt;BR /&gt;
&lt;BR /&gt;
You're using \, which is the integer division operator.  Operands are &lt;BR /&gt;
rounded to integers before the division takes place, I believe.&lt;BR /&gt;
&lt;BR /&gt;
Also, Fix'ing the result of integer division is redundant.&lt;BR /&gt;
&lt;BR /&gt;
Use the normal division operator: /.&lt;BR /&gt;
&lt;BR /&gt;
 &amp;gt; feet = Fix(119.5\12) = 10??? (instead of 9!!!)&lt;BR /&gt;
&lt;BR /&gt;
Fix(119.5 \ 12) == (119.5 \ 12) == 10&lt;BR /&gt;
Fix(119.5 / 12) == 9&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Adam</description>
      <pubDate>Wed, 30 Nov 2005 22:54:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498682#M38586</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-30T22:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Int() problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498683#M38587</link>
      <description>? Fix(119.5 / 12)&lt;BR /&gt;
 9&lt;BR /&gt;
&lt;BR /&gt;
Note the division symbol....they ARE different.&lt;BR /&gt;
&lt;BR /&gt;
&lt;CRIZ&gt; wrote in message news:5026055@discussion.autodesk.com...&lt;BR /&gt;
i am writing code for convert inch to feet. In my code:&lt;BR /&gt;
&lt;BR /&gt;
feet = Fix(InchesInput \ 12)&lt;BR /&gt;
&lt;BR /&gt;
the code works fine, except when it comes 11'-11 1/2" (143.5 inches) or &lt;BR /&gt;
9'-11 1/2" (119.5 inches) etc (as long as 11 1/2"), the result becomes&lt;BR /&gt;
&lt;BR /&gt;
feet = Fix(119.5\12) = 10??? (instead of 9!!!)&lt;BR /&gt;
feet = Fix(143.5\12) = 12??? (instead of 11!!!)&lt;BR /&gt;
&lt;BR /&gt;
How come?? Any suggestion??&lt;BR /&gt;
&lt;BR /&gt;
thanks,&lt;/CRIZ&gt;</description>
      <pubDate>Wed, 30 Nov 2005 23:09:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498683#M38587</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-30T23:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Int() problem</title>
      <link>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498684#M38588</link>
      <description>You guys are great!! Silly me. &lt;BR /&gt;
&lt;BR /&gt;
Thanks,!!</description>
      <pubDate>Thu, 01 Dec 2005 14:35:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/int-problem/m-p/1498684#M38588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-12-01T14:35:03Z</dc:date>
    </item>
  </channel>
</rss>

