writing uint16's to a binary file

Ken G. Brown kbrown at tnc.ab.ca
Mon Mar 11 18:04:29 UTC 2002


I'm needing to write a bunch of lines of uint16's to a binary file. So far I
have a variation of the following but it gives a message not understood,
adaptToNumber:andSend:.

test _ #(1 2 3 4 5 6 7 8).
rStr _ ReadStream on: test.
outfile _ fileStream _ (FileStream newFileNamed: 'outfile') binary.
outfile nextPutAll: (rStr do: [ :ii | rStr uint16]).
outfile close.

I'm stuck at this point. Any tips would be appreciated.

Thx.
Ken Brown





More information about the Squeak-dev mailing list