Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!gatech!swrinde!pipex!uknet!festival!olly
From: olly@festival.ed.ac.uk (O Morgan)
Subject: writing numbers to a string
X-Newsreader: TIN [version 1.1 PL8]
Message-ID: <D50tur.1K4@festival.ed.ac.uk>
Organization: Edinburgh University
Date: Mon, 6 Mar 1995 13:37:38 GMT
Lines: 24

I'm new to Smalltalk, so grateful for any help.  Sorry if it's a stupid
question but I really can't figure this out.

I want to 'convert' an integer into string form.  
Something like 
	aString := anInteger asString.
Eg: in 'C', the equivalent of 
	sprintf("string text %d bit more %f",x,y);

I've tried WriteStreams (nextPut:, nextPutAll:, nextTwoBytesPut:, etc),
no joy.

printOn: aWriteStream hasn't worked for me either.

Currently I can work it by writing the number to a file and reading it
back.

Could someone point out a (no doubt blindingly obvious) way of doing
this simply.

Thanks for any help.

Olly

