Hello, world!
This program just opens a small window displaying
the message "Hello, world!". The window will look something like this
(depending on your setup):
Here is the source code:
Things to note
- To use the fudget library, you should import the module
Fudgets
. If you use the command hbcxmake
to
compile your program you don't have to worry about exactly
where the Fudget library is located.
- A fudget program consists of a number of fudgets combined in a
hierarchical structure into one main fudget. The function
fudlogue
is used to connect the main fudget to the Haskell I/O system.
It also handles various initialisation and administration.
- A fudget program with a graphical user interface needs one or more
shell windows (top level windows). These can be created with
the function
shellF
.
The last argument is the fudget which determines the contents of the
window.
- In this simple program, the contents of the shell window is just a
simple string display, which is created with the function
labelF
.
The argument is the string to be displayed.