<html><head></head><body lang="zh-TW" style="background-color: rgb(255, 255, 255); line-height: initial;"> <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);">Adopt log library and extend it with your own implementation</div> <div style="width: 100%; font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br style="display:initial"></div> <div style="font-size: initial; font-family: Calibri, 'Slate Pro', sans-serif, sans-serif; color: rgb(31, 73, 125); text-align: initial; background-color: rgb(255, 255, 255);"><br></div> <table width="100%" style="background-color:white;border-spacing:0px;"> <tbody><tr><td colspan="2" style="font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"> <div style="border-style: solid none none; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding: 3pt 0in 0in; font-family: Tahoma, 'BB Alpha Sans', 'Slate Pro'; font-size: 10pt;"> <div><b>寄件者: </b>'Lasse R.H. Nielsen' via Dart Misc</div><div><b>已傳送: </b>2015年7月13日星期一 17:14</div><div><b>收件者: </b>***@dartlang.org</div><div><b>回覆至: </b>***@dartlang.org</div><div><b>主旨: </b>Re: [dart-misc] set global default double -> string precision</div></div></td></tr></tbody></table><div style="border-style: solid none none; border-top-color: rgb(186, 188, 209); border-top-width: 1pt; font-size: initial; text-align: initial; background-color: rgb(255, 255, 255);"></div><br><div id="_originalContent" style=""><div dir="ltr">Not any request or discussion that I can remember.<div><br></div><div>If you have a fixed format that you tend to use, you could use a helper function to do the formatting for you:</div><div><br></div><div>int fixedPrecision = 3;</div><div>String toFixed(double value) => value.toStringAsFixed(fixedPrecision);</div><div><br></div><div>We don't have any printf, which is what you would normally use in other languages, because string interpolations does most of the job very well.</div><div>A case that it doesn't handle as well is number formatting, which gets pretty verbose.</div><div><br></div><div>/L</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 13, 2015 at 12:20 AM, Rich Eakin <span dir="ltr"><<a href="mailto:***@gmail.com" target="_blank">***@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I've been working on a simulation in dart and found the double.<span>toStringAsFixed</span>() method very useful in controlling how much data gets printout to console when I'm debugging variables. I was thinking though, it would be nice if it was possible to set a global precision for my application or isolate, so that I did not have to write that method in every print statement that I make. Is there any existing discussion for something like this, or a feature request?<div><br></div><div>cheers,</div><div>Rich </div></div><span class="HOEnZb"><font color="#888888">
<p></p>
-- <br>
For other discussions, see <a href="https://groups.google.com/a/dartlang.org/" target="_blank">https://groups.google.com/a/dartlang.org/</a><br>
<br>
For HOWTO questions, visit <a href="http://stackoverflow.com/tags/dart" target="_blank">http://stackoverflow.com/tags/dart</a><br>
<br>
To file a bug report or feature request, go to <a href="http://www.dartbug.com/new" target="_blank">http://www.dartbug.com/new</a><br>
<p></p>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:misc+***@dartlang.org" target="_blank">misc+***@dartlang.org</a>.<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Lasse R.H. Nielsen - <a href="mailto:***@google.com" target="_blank">***@google.com</a> <div>'Faith without judgement merely degrades the spirit divine'<br><font size="1" color="#999999">Google Denmark ApS - Frederiksborggade 20B, 1 sal - 1360 København K - Denmark - CVR nr. 28 86 69 84</font></div></div>
</div>
<p></p>
-- <br>
For other discussions, see <a href="https://groups.google.com/a/dartlang.org/">https://groups.google.com/a/dartlang.org/</a><br>
<br>
For HOWTO questions, visit <a href="http://stackoverflow.com/tags/dart">http://stackoverflow.com/tags/dart</a><br>
<br>
To file a bug report or feature request, go to <a href="http://www.dartbug.com/new">http://www.dartbug.com/new</a><br>
<p></p>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:misc+***@dartlang.org">misc+***@dartlang.org</a>.<br>
<br><!--end of _originalContent --></div></body></html>
<p></p>
-- <br />
For other discussions, see <a href="https://groups.google.com/a/dartlang.org/">https://groups.google.com/a/dartlang.org/</a><br />
<br />
For HOWTO questions, visit <a href="http://stackoverflow.com/tags/dart">http://stackoverflow.com/tags/dart</a><br />
<br />
To file a bug report or feature request, go to <a href="http://www.dartbug.com/new">http://www.dartbug.com/new</a><br />
<p></p>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:misc+***@dartlang.org">misc+***@dartlang.org</a>.<br />