Go to the first, previous, next, last section, table of contents.

WAFE Goodbye World

Following hallowed tradition, we begin with the simplest visibly functional program feasible, just to demonstrate the mechanics of constructing and running a wafe application:

#!/usr/local/bin/wafe --f
Command c topLevel      \
    label    "Goodbye World!" \
    callback {puts Goodbye; quit}
realize

If you create a textfile "goodbye.wafe" containing the above text, make it executable by doing

chmod +x ./goodbye.wafe

at the unix prompt, and then execute it by doing

./goodbye.wafe

you should see a small X window with "Goodbye!" written on it appear: Clicking on the "Goodbye!" should make the window vanish and the word "Goodbye" print out on the terminal.

(If the wafe executable is installed on your system in some place other than /usr/local/bin, you will need to change the first line of the above script accordingly.)

If you prefer to save typing, all examples shown are available in the examples/ directory.


Go to the first, previous, next, last section, table of contents.