articles/smalltalk.md: update

This commit is contained in:
tocariimaa 2025-03-09 13:58:57 -03:00
parent b899e7e291
commit f01881984d

View file

@ -10,7 +10,7 @@ or return an error if it doesn't understand the received message.
```smalltalk
"Sends the message `say` to `anObject` with the value `hi`"
anObject say: 'hi'
anObject say: 'hi'.
```
Objects from a hierarchy, where ultimately all objects descend from the same `Object` object.
@ -40,7 +40,8 @@ the `.st` extension for Smalltalk files.
### Hello world
Here we send a string to the global `Transcript` object, which will output
the message in the "transcript" window (on a GUI environment) or to stdout for a headless implementation (like GNU Smalltalk).
the message in the "transcript" window (on a GUI environment) or to stdout for a headless implementation (like GNU Smalltalk),
followed by a newline using the `cr` message (also sent to `Transcript`).
```smalltalk
Transcript show: 'Hello, world!'; cr.
```