[Newbies] How can I execute a script on carriage return?
sthomas1 at gosargon.com
Mon Feb 28 03:31:22 UTC 2011
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.
I ran the three commands below in a workspace and don't understand why the
first one failed
Transcript show: 2.54343 printShowingDecimalPlaces: 2 - Failed Message
t2 := 2.54343 printShowingDecimalPlaces: 2 - OK
Transcript show: t2 - OK showed 2.54 in Transcript
On Sun, Feb 27, 2011 at 9:11 PM, K. K. Subramaniam <kksubbu.ml at gmail.com>wrote:
> On Friday 25 Feb 2011 12:07:42 pm Steve Thomas wrote:
> > How do I print integers or specify that I only want 2 digits to the right
> > of the decimal point? (Below is my script).
> > script1
> > | tmpStr |
> > tmpStr := 'Im a Bot.\My position is: ' withCRs , self getLocation
> > printString , '\and my direction is:' withCRs , self getHeading
> > printString. self sayText: tmpStr
> see printShowingDecimalPlaces: in Integer>>printing category. Also search
> 'places' in message window for other options.
> HTH .. Subbu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners