Search code examples
smalltalkgnu-smalltalk

reading smalltalk code from gst prompt


This is simple GNU Smalltalk question. Sorry, but just could not find how to do this.

I'm playing with gnu smalltalk, I know I can do

% gst <file-name>

but if I already in gst> prompt, how can I read a file into memory (file that contains code), something like TCL source command.

thanks and applogies again for the simple question.


Solution

  • You can use:

    st> fd := FileDescriptor open: './myfile.st'
    <FileDescriptor on "/Users/math/myfile.st">
    st> fd fileIn