How Do I...


See what a script is

Write Smalltalk scripts No tips for this topic No example for this topic Open a Script Editor on my part

A script is Smalltalk code that implements action for a part. A script is also known as a method.

An example of a script is as follows:

wordsToShow
  "Return the string: Later text."
  | words |
  words := 'Later text'.
  ^words
 

This script named wordsToShow, when run, returns the words Later text.

A script usually has the following format:
scriptName
"comment"
| temporary variables |
Smalltalk code


[ Top of Page | Previous Page | Next Page | Table of Contents ]