<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>RealNumber := 1.5;</div><div>FloatToStr(RealNumber:2,RealStr);</div><div>DbeditBox.text := RealStr</div><div><br></div><div>The ":2" specifies the number of decimal. If you were using WRITE to output to the console, it would look like:</div><div><br></div><div>RealNumber := 13.3456;</div><div>writeln('Number = ',RealNumber:3:2);</div><div><br></div><div>Which would output</div><div>Number = 13.34</div><div><br></div><div>The first number = the number of spaces after the literal (notice the extra space after the equals), and the second is the number of decimal places to print. NOTE, in both examples, the formatting dies bit change the value (i.e. No rounding or trunking happen, just the number of decimal places specified are printed). </div><div><br></div><div>Hope that helps. </div><div><br></div><div>-Chris</div><div>-------- Everything at or below the line is a signature, not to be confused with the body of the email above. Sorry about the last signature text that seemed to have some people questioning my sanity. <div><br></div><div><p style="margin: 0px 0px 10px;"><span style="background-color: rgba(255, 255, 255, 0);">We are what we repeatedly do. Excellence, then, is not an act, but a habit.</span></p><p style="margin: 0px 0px 10px;"><span style="background-color: rgba(255, 255, 255, 0);">-Aristotle</span></p><p style="margin: 0px 0px 10px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p></div></div><div><br>On Dec 9, 2014, at 23:03, Larry Dalton <<a href="mailto:larrydalton71@gmail.com">larrydalton71@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><span>How do I get a real number to display as a decimal in a dbedit instead of an exponential number?</span><br><span></span><br><span>Sent from my iPhone</span><br><span>--</span><br><span>_______________________________________________</span><br><span>Lazarus mailing list</span><br><span><a href="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</a></span><br><span><a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a></span><br></div></blockquote></body></html>