Numbers in Smalltalk

Lex Spoon lex at cc.gatech.edu
Fri Dec 14 01:22:19 UTC 2001


> I want to output this to a file... but smalltalk comes up with something 
> about "ERROR: anString) when I put nextPutAll.  It does it with strings ok, 
> but with numbers it will not output to a file, any suggestions? is a number 
> a byte?

Try #print: or #store: instead of #nextPutAll: -- #nextPutAll: when sent
to a file specifically expects a collection of characters (or, well, a
ByteArray).  #print: and #store: are more flexible.


-Lex




More information about the Squeak-dev mailing list