Usage

What is a relocatable install? Are GNU Smalltalk installations relocatable?

Tagged:

A relocatable program can be moved or copied to a different location on the filesystem. A program supports a relocatable install if a user can copy a program, installed by another user on the same machine, to his home directory, and have it work correctly.

Versions of GNU Smalltalk up to 3.0a are never relocatable. Newer versions are relocatable under special conditions only.

How do I read input from the keyboard?

Tagged:

You can use the special stdin file, which you can also access (if you prefer) as FileStream stdin. Like this:

   line := stdin nextLine

or if you want a number

   n := stdin nextLine asInteger

How do I convert Squeak code to GNU Smalltalk?

Tagged:

gst-convert can be used. It also supports rewrite rules to fix dialect incompatibilities automatically. You can write a script called, for example, gst-squeak like this one:

#! /bin/sh
#
# usage: gst-squeak SOURCE DEST
#
# Converts Squeak code to GNU Smalltalk
# Stymied by code like "foo-10" (notice no space around the
# minus), otherwise should work fine.

exec gst-convert -f squeak \ 
  -r'MessageSend->DirectedMessage' \ 
  -r'ProtoObject->nil' \ 
  -r'DateAndTime->DateTime' \ 

I found a bug in GNU Smalltalk, how do I debug it/fix it?

Tagged:

There are comprehensive information on this in the Hacker's guide.

How do I use the GNU Smalltalk REP-loop?

Tagged:

First of all, the REP loop (or REPL) is short for read-eval-print-loop: when invoked normally, GNU Smalltalk will read Smalltalk code, evaluate it, print the result, until it is exited.

While working in the REPL, GNU Smalltalk will automatically add a period at the end of a line (to terminate a statement) if the Smalltalk syntax allows it. If you don't want the statement to terminate (e.g. if you want to continue a keyword message on the next line), wrap the statement in parentheses. For example, instead of this:

<pre>

Syndicate content

User login