Introduction

How do I get GNU Smalltalk?

Tagged:

See the download section of this site.

If you are interested in development versions, you might also use the CVS and Arch repositories that host the most recent code for GNU Smalltalk.

Is there a GNU Smalltalk tutorial?

Tagged:

Yes, there is a tutorial that is part of the GNU Smalltalk manual. See here for an online version.

How does Smalltalk look like?

Tagged:

Let's define a class called Person, holding a name and an age. (Note: this code only works in Smalltalk 2.95a and later. The syntax for previous versions is more verbose and less clear).

Object subclass: Person [
    | name age |
    Person class >> name: aString age: anInteger [
        ^self new name: aString; age: anInteger; yourself
    ]

    name [ ^name ]
    name: aString [ name := aString ]
    age [ ^age ]
    age: anInteger [ age := anInteger ]

    printOn: aStream [
        aStream << ('%1 (%2)' % {name. age})
    ]
]

My question is not listed here!

Tagged:

Write it in a comment to this question.

Syndicate content

User login