Commit | Line | Data |
---|---|---|
673509f8 MG |
1 | -*- outline -*- |
2 | ||
3 | * Overview | |
2de7ddb7 MG |
4 | |
5 | This directory includes examples which show how to write scripts using | |
6 | Guile. | |
7 | ||
8 | The descriptions below assume that you have a working copy of Guile | |
9 | installed and available with the standard installation prefix | |
10 | `/usr/local'. | |
11 | ||
673509f8 MG |
12 | * Included Examples |
13 | ||
14 | ||
15 | ** simple-hello.scm | |
2de7ddb7 MG |
16 | |
17 | The simplest "Hello World!" program for Guile. Run it like this: | |
18 | ||
19 | $ guile -s simple-hello.scm | |
20 | ||
673509f8 | 21 | ** hello |
2de7ddb7 MG |
22 | |
23 | An advanced version of the script above, with command line handling | |
24 | for the important options --help and --version. Run it like this: | |
25 | ||
26 | ./hello | |
27 | ||
28 | or | |
29 | ||
30 | guile -s hello | |
31 | ||
673509f8 | 32 | ** fact |
2de7ddb7 MG |
33 | |
34 | Command-line factorial calculator. Run it like this: | |
35 | ||
36 | ./fact 5 | |
37 | ||
38 | to calculate the factorial of 5. |