0% found this document useful (0 votes)
222 views2 pages

Smalltalk Hello World Example

To write and execute a Smalltalk program on Linux: 1. Create a Hello World program using Vim that prints "Hello World!" 2. Ensure GNU Smalltalk (gst) is installed which provides the virtual machine to run Smalltalk code. 3. Run the program by executing gst on the file or interactively run Smalltalk commands within gst.

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)
222 views2 pages

Smalltalk Hello World Example

To write and execute a Smalltalk program on Linux: 1. Create a Hello World program using Vim that prints "Hello World!" 2. Ensure GNU Smalltalk (gst) is installed which provides the virtual machine to run Smalltalk code. 3. Run the program by executing gst on the file or interactively run Smalltalk commands within gst.

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/ 2

Question : I would like to understand the basics of how to write and execute a small talk program on Linux OS.

Can you explain it with a simple example? Answer : In this article, let us review very quickly how to write a basic Hello World SmallTalk program and execute *.st program on Linux or Unix OS.

1. Write a Hello World SmallTalk Program


Create the helloworld.st program using the Vim editor as shown below.

$v i mh e l l o w o r l d . s t " H e l l ow o r l dP r o g r a m " ' H e l l oW o r l d ! 'p r i n t N l!

2. Make sure gst (GNU Smalltalk) is installed on your system


Make sure gst is installed on your system as shown below.

$w h e r e i sg s t g s t :/ u s r / b i n / g s t/ u s r / i n c l u d e / g s t . h/ u s r / s h a r e / m a n / m a n 1 / g s t . 1 . g z $w h i c hg s t / u s r / b i n / g s t

Installing GNU Smalltalk virtual machine.


If you dont have smalltalk virtual machine, install it as shown below.

$s u d oa p t g e ti n s t a l lg n u s m a l l t a l k

3. Execute the small talk program.


$g s th e l l o w o r l d . s t H e l l oW o r l d !

4. Smalltalk interactive mode


You can also execute smalltalk commands interactively in the smalltalk shell as shown below.

$g s tq G N US m a l l t a l kr e a d y s t >' H e l l oW o r l d ! 'p r i n t N l! ' H e l l oW o r l d ! ' s t >

You might also like