FYI, I have the same problem in Squeak 4.2 and Etoys 4.1<div><br></div><div>Also I noticed that if I use parentheses I can get it to work:</div><div>Transcript show: (2.54343 printShowingDecimalPlaces: 2) <meta charset="utf-8"> <font color="#006600">- OK does not throw exception</font></div>
<div><font class="Apple-style-span" color="#006600"><br></font></div><div><font color="#006600"></font><font class="Apple-style-span" color="#006600">Stephen<br></font><br><div class="gmail_quote">On Sun, Feb 27, 2011 at 10:31 PM, Steve Thomas <span dir="ltr"><<a href="mailto:sthomas1@gosargon.com">sthomas1@gosargon.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Subbu,<div><br></div><div>Thanks it did help, I got it to work, but I don't understand the following and not sure if it is a bug in Squeak or in my head.</div>
<div>I ran the three commands below in a workspace and don't understand why the first one failed</div>
<div><br></div><div><div>Transcript show: 2.54343 printShowingDecimalPlaces: 2 <font color="#FF0000">- Failed Message Not Understood</font></div><div>t2 := 2.54343 printShowingDecimalPlaces: 2 <font color="#006600">- OK</font></div>
<div>Transcript show: t2 <span style="color:rgb(0, 102, 0)">- OK showed 2.54 in Transcript</span></div><div><br>Stephen</div><div><div></div><div class="h5"><div><span style="color:rgb(0, 102, 0)"><br>
</span></div><br><div class="gmail_quote">On Sun, Feb 27, 2011 at 9:11 PM, K. K. Subramaniam <span dir="ltr"><<a href="http://kksubbu.ml" target="_blank">kksubbu.ml</a>@<a href="http://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>On Friday 25 Feb 2011 12:07:42 pm Steve Thomas wrote:<br>
> How do I print integers or specify that I only want 2 digits to the right<br>
> of the decimal point? (Below is my script).<br>
> script1<br>
><br>
> | tmpStr |<br>
><br>
> tmpStr := 'Im a Bot.\My position is: ' withCRs , self getLocation<br>
> printString , '\and my direction is:' withCRs , self getHeading<br>
> printString. self sayText: tmpStr<br>
<br>
</div>see printShowingDecimalPlaces: in Integer>>printing category. Also search for<br>
'places' in message window for other options.<br>
<br>
HTH .. Subbu<br>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div>