Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

links to this page:

Installing and Running Squeak

go there

The Smalltalk Language


Last updated at 7:22 am UTC on 8 November 2006

This is chapter 2 of the Squeak Tutorial < previous chapter | next chapter >

Doing some simple things in Smalltalk


Smalltalk is a highly dynamic language, you can often see the results directly. Let's open a Workspace window to start playing around: Open the world menu, then click on "open", then "Workspace". In a workspace, you can execute small programs, and mix that with comments and results. Let's see how Smalltalk computes. Type this into the workspace:
2+2

Now run the code: Select it with the mouse Print the result: right click on the selection, and choose "Print it" You an guess what the expected result is, can't you? You actually executed a small program! This works not only in a workspace but nearly everywhere in Smalltalk where you can edit some text: see a small snippet of code, select it, "print it" (keyboard shortcut: cmd-p) and look at the result. Now for something more interesting:

You might also like