0% found this document useful (0 votes)
23 views1 page

Doing Some Simple Things in Smalltalk

This document provides an introduction to doing simple computations in the Smalltalk programming language. It instructs the user to open a Workspace window to evaluate code snippets, and provides examples of evaluating the expressions "2+2" and other snippets of code by selecting them and using the "Print it" command. The document introduces how Smalltalk allows seeing computational results directly through its highly dynamic nature.

Uploaded by

Ashok Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views1 page

Doing Some Simple Things in Smalltalk

This document provides an introduction to doing simple computations in the Smalltalk programming language. It instructs the user to open a Workspace window to evaluate code snippets, and provides examples of evaluating the expressions "2+2" and other snippets of code by selecting them and using the "Print it" command. The document introduces how Smalltalk allows seeing computational results directly through its highly dynamic nature.

Uploaded by

Ashok Pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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