The workspace shape in Smalltalk
The smallest Smalltalk: temporaries, messages, Transcript.
"Everything is a message send; Transcript is the console."
| shop |
shop := 'The Standing Type'.
Transcript show: 'Press day at ', shop; cr.
Transcript show: (6 * 8) printString, ' pages to impose'; cr.
How it works
| shop |declares a temporary between vertical bars.Transcript show:prints; the cascade; cradds the newline.(6 * 8) printStringturns the number into printable text.
Keywords and builtins used here
TranscriptcrprintString
The run, in numbers
- Lines
- 5
- Characters to type
- 202
- Tokens
- 29
- Three-star pace
- 65 tpm
At the three-star pace of 65 tokens a minute, this run takes about 27 seconds.
Step 1 of 3 in Values, step 1 of 31 in Language basics.