<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>Scirra Forum : Able to stop calculation returning &#039;e-002&#039; at end?</title>
  <link>http://www.scirra.com/forum/</link>
  <description>This is an XML content feed of; Scirra Forum : Help &amp; Support using Construct Classic : Able to stop calculation returning &#039;e-002&#039; at end?</description>
  <copyright>Copyright (c) 2006-2011 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 19 Jun 2013 01:48:54 +0000</pubDate>
  <lastBuildDate>Wed, 18 Apr 2012 22:26:36 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 10.01</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.scirra.com/forum/RSS_post_feed.asp?TID=51225</WebWizForums:feedURL>
  <image>
   <title>Scirra Forum</title>
   <url>http://www.scirra.com/forum/forum_images/web_wiz_forums.png</url>
   <link>http://www.scirra.com/forum/</link>
  </image>
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : Adding int() did the trick.I left...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323327.html#323327</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/seridras">seridras</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 10:26pm<br /><br />Adding int() did the trick.<br /><br />I left off the (Balance*100)%100 since Balance was already storing cents in integer form (holdover from previous reference materials).<br /><br />Thanks!]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 22:26:36 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : @seridrastry this:&amp;#034;$&amp;#034;...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323293.html#323293</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/r0j0hound">R0J0hound</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 7:42pm<br /><br />@seridras<br />try this:<br />"$" &int(Balance) &"." &right("00" &(Balance*100)%100,2)]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 19:42:08 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? :   7Soul wrote:@R0J0houndThere&amp;#039;s...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323251.html#323251</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/seridras">seridras</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 5:42pm<br /><br /> <table width="99%"><tr><td class="BBquote"><img src="//static2.scirra.net/forum_images/quote_box.png" title="Originally posted by 7Soul" alt="Originally posted by 7Soul" style="vertical-align: text-bottom;" /> <strong>7Soul wrote:</strong><br /><br />@R0J0hound<br />There's no FormatDecimal on C2 :/<br />And thx for the explanation</td></tr></table> <br /><br />I have tried using FormatDecimal to format text into currency, and always get an error for unknown expression.<br /><br /><br />Original format:<br /><br />"$" &(Balance/100) &"." &right("00" &Balance%100,2)<br /><br />has issues with displaying cents properly.<br /><br />Looking for a better solution, or advice on what may be causing the error.]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 17:42:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : Ahhh thank you, I hadn&amp;#039;t...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323177.html#323177</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/sparkfeather">sparkfeather</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 10:04am<br /><br />Ahhh thank you, I hadn't realized that was meant to indicate it was being<br />turned into a string, just thought that was to highlight what the end result was.<br /><br /><br />Doing that would work if the number wasn't changing so radically as I mentioned,<br />which makes that more misleading/distracting than anything.<br />But I did get around it by as you said using the number itself in its<br />continued calculation, and I instead made another variable for it to<br />send the FormatDecimal result so I can keep an eye on it there :).<br /><br />Thank you both very much for your help again, I can finally continue<br />moving forward with the project.]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 10:04:14 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : FormatDecimal, as ROJO showed...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323149.html#323149</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/tulamide">tulamide</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 6:02am<br /><br />FormatDecimal, as ROJO showed in his example and can be seen in the wizard, outputs a string, not a number. There's no need to convert a number using FormatDecimal into a string and then keep on calculating with it. Just calculate with the number itself, not its human readable text form.<br /><br />btw, it isn't that hard to read. 2.68e-002 just means: shift the number 2.68 two decimal places to the right (2.68-&gt;0.268-&gt;0.0268)<br />It's the same with everything else. 2.68e-003 = shift 3 decimal places to the right = 0.00268, etc.<br />There's also the other way round. 1.5e+003 would mean, shift the number three decimal places to the left = 1500]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 06:02:31 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : Thank you very much :)It seems...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323129.html#323129</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/sparkfeather">sparkfeather</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 18 Apr 2012 at 3:20am<br /><br />Thank you very much :)<br /><br />It seems to work, however.....What on earth is this message about<br />'Cannot add with integer and string. Operator had no effect' error<br />that is caused when using FormatDecimal?<br />As well as 'Cannot add with float and string. Operator had no effect'<br /><br />Now it won't let me add that variable in other calculations??<span style="font-size:10px"><br /><br />Edited by sparkfeather - 18 Apr 2012 at 3:26am</span>]]>
   </description>
   <pubDate>Wed, 18 Apr 2012 03:20:45 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : @R0J0houndThere&amp;#039;s no FormatDecimal...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post323033.html#323033</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/7soul">7Soul</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 17 Apr 2012 at 5:54pm<br /><br />@R0J0hound<br />There's no FormatDecimal on C2 :/<br />And thx for the explanation]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 17:54:58 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : Use the &amp;#034;FormatDecimal()&amp;#034;...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post322940.html#322940</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/r0j0hound">R0J0hound</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 17 Apr 2012 at 7:50am<br /><br />Use the "FormatDecimal()" system expression, it's output won't become 2.68e-002.<br />ex.<br />FormatDecimal(0.0268, 4) -&gt; "0.0268"<br /><br />@7Soul<br />That has to do with floating point precision.<br />Short Answer:<br />0.1 can't be exactly represented in binary, so a close approximation is used.  When adding the number multiple times the inaccuracy grows.  It is an issue with all computers.  The number will not always be exact but it will be accurate to a certain number of digits, so the error is usually insignificant.<br /><br />Long Answer:<br /><a href="http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html" target="_blank" rel="nofollow">http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html</a><span style="font-size:10px"><br /><br />Edited by R0J0hound - 17 Apr 2012 at 7:50am</span>]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 07:50:13 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : Also, sometimes I have a value...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post322938.html#322938</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/7soul">7Soul</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 17 Apr 2012 at 7:09am<br /><br />Also, sometimes I have a value and I add 0.1 every tick. If I print this value after 10 ticks, it will return 10.0000000000010 or something like that<br /><br /><a href="http://dl.dropbox.com/u/3954039/values.capx" target="_blank" rel="nofollow">Here's a capx</a><br />After more or less 5 seconds, it displays many zeroes<br /><br />Also, notice that I used "every 1 second" but the timer seems a bit random, why is that?<span style="font-size:10px"><br /><br />Edited by 7Soul - 17 Apr 2012 at 7:18am</span>]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 07:09:28 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
  <item>
   <title>Able to stop calculation returning &#039;e-002&#039; at end? : It&amp;#039;s extremely frustrating...</title>
   <link>http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225_post322936.html#322936</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="../users/sparkfeather">sparkfeather</a><br /><strong>Subject:</strong> 51225<br /><strong>Posted:</strong> 17 Apr 2012 at 6:38am<br /><br />It's extremely frustrating having my values randomly returning these<br />because it makes trying to balance the values and growth really hard<br />when it will be something like 0.16 and then 2.68e-002...<br />I have no idea what the actual values it is ranging from are and I<br />can't try and workout how to calculate that every single time it<br />changes, as it does so continuously.<br /><br />I'd extremely appreciate if anyone knows how to stop this happening,<br />it's an absolute nightmare and I've lost far too much time over this.]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 06:38:16 +0000</pubDate>
   <guid isPermaLink="true">http://www.scirra.com/forum/able-to-stop-calculation-returning-e002-at-end_topic51225.html</guid>
  </item> 
 </channel>
</rss>