Home Segments Index Top Previous Next

783: Mainline

The next major distinction between VisualWorks and Smalltalk Express lies in the handling of input and output from files. In Chapter 22, you learned to create input streams, using Smalltalk Express, as demonstrated by the following example:

inputStream := File pathName: 'c:\test\input.dta'. 

In VisualWorks you create an input stream as follows:

inputStream := 'c:\test\input.dta' asFilename readStream. 

Similarly, you create an output stream as follows:

outputStream := 'c:\test\output.dta' asFilename writeStream.