[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/examples ChangeLog README box/...
From: |
Martin Grabmueller |
Subject: |
guile/guile-core/examples ChangeLog README box/... |
Date: |
Thu, 14 Jun 2001 13:36:06 -0700 |
CVSROOT: /cvs
Module name: guile
Changes by: Martin Grabmueller <address@hidden> 01/06/14 13:36:06
Modified files:
guile-core/examples: ChangeLog README
guile-core/examples/box: README
guile-core/examples/box-dynamic: README
guile-core/examples/box-dynamic-module: Makefile.am README
box-module.scm box.c
guile-core/examples/box-module: README
guile-core/examples/modules: README module-0.scm module-1.scm
module-2.scm
guile-core/examples/safe: README evil.scm untrusted.scm
guile-core/examples/scripts: README fact hello simple-hello.scm
Added files:
guile-core/examples/box-dynamic-module: box-mixed.scm
Log message:
* scripts/README, scripts/hello.scm, safe/untrusted.scm,
safe/evil.scm, safe/README, modules/README, modules/main,
modules/module-0.scm, modules/module-1.scm, modules/module-2.scm:
Minor cleanup.
* README: Added intro stuff, restructured a bit.
* box-dynamic/README, box-module/README, box/README: Cleanup and
restructuring.
* box-dynamic-module/box-mixed.scm: New file, demonstrating usage
of extension library functionality, but without exporting
procedures from the library.
Thanks to Thomas Wawrzinek for the idea and example code!
* box-dynamic-module/box-module.scm: Add comments, export
make-box, box-ref, box-set!.
* box-dynamic-module/README: Integrate new module (box-mixed),
restructure and cleanup a bit.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/ChangeLog.diff?cvsroot=OldCVS&tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/README.diff?cvsroot=OldCVS&tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic-module/box-mixed.scm?cvsroot=OldCVS&rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic-module/Makefile.am.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic-module/README.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic-module/box-module.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-dynamic-module/box.c.diff?cvsroot=OldCVS&tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/box-module/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/modules/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/modules/module-0.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/modules/module-1.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/modules/module-2.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/safe/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/safe/evil.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/safe/untrusted.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/scripts/README.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/scripts/fact.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/scripts/hello.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/examples/scripts/simple-hello.scm.diff?cvsroot=OldCVS&tr1=1.1&tr2=1.2&r1=text&r2=text
Patches:
Index: guile/guile-core/examples/ChangeLog
diff -u guile/guile-core/examples/ChangeLog:1.5
guile/guile-core/examples/ChangeLog:1.6
--- guile/guile-core/examples/ChangeLog:1.5 Wed Jun 6 13:14:51 2001
+++ guile/guile-core/examples/ChangeLog Thu Jun 14 13:36:05 2001
@@ -1,3 +1,27 @@
+2001-06-14 Martin Grabmueller <address@hidden>
+
+ * scripts/README, scripts/hello.scm, safe/untrusted.scm,
+ safe/evil.scm, safe/README, modules/README, modules/main,
+ modules/module-0.scm, modules/module-1.scm, modules/module-2.scm:
+ Minor cleanup.
+
+ * README: Added intro stuff, restructured a bit.
+
+ * box-dynamic/README, box-module/README, box/README: Cleanup and
+ restructuring.
+
+ * box-dynamic-module/box-mixed.scm: New file, demonstrating usage
+ of extension library functionality, but without exporting
+ procedures from the library.
+
+ Thanks to Thomas Wawrzinek for the idea and example code!
+
+ * box-dynamic-module/box-module.scm: Add comments, export
+ make-box, box-ref, box-set!.
+
+ * box-dynamic-module/README: Integrate new module (box-mixed),
+ restructure and cleanup a bit.
+
2001-06-06 Martin Grabmueller <address@hidden>
* box-dynamic-module/box-module.scm: New file.
Index: guile/guile-core/examples/README
diff -u guile/guile-core/examples/README:1.3
guile/guile-core/examples/README:1.4
--- guile/guile-core/examples/README:1.3 Tue Jun 5 10:33:40 2001
+++ guile/guile-core/examples/README Thu Jun 14 13:36:05 2001
@@ -1,12 +1,28 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory contains examples illustrating various aspects of Guile
programming.
+If you plan writing Scheme programs, have a look at the `scripts'
+directory. To learn more about Guile modules, check out the `modules'
+directory, and maybe the `box-module' and `box-dynamic-module'
+directories, if you are into C programming or shared libraries,
+respectively. The `safe' directory contains examples for evaluation
+Scheme code in controlled environments (sandboxing). The directories
+`box', `box-module', `box-dynamic' and `box-dynamic-module' are
+interesting if you plan writing Guile extensions.
+
See the README files in the subdirectories for details.
+
+* Included Examples
+
scripts Examples for writing simple scripts in Guile Scheme.
+
box Example for extending Guile with a new data type.
+
box-module Similar to `box', but defines new procedures in a
named module.
box-dynamic Implements the box type in a dynamically loadable
@@ -14,6 +30,7 @@
box-dynamic-module Combination of `box-module' and `box-dynamic':
Implements the `box' type in a shared library and
defines the procedures in a Guile module.
+
modules Examples for writing and using Guile modules.
-safe Examples for creating and using safe environments.
+safe Examples for creating and using safe environments.
Index: guile/guile-core/examples/box-dynamic-module/Makefile.am
diff -u guile/guile-core/examples/box-dynamic-module/Makefile.am:1.2
guile/guile-core/examples/box-dynamic-module/Makefile.am:1.3
--- guile/guile-core/examples/box-dynamic-module/Makefile.am:1.2 Wed Jun
6 13:14:51 2001
+++ guile/guile-core/examples/box-dynamic-module/Makefile.am Thu Jun 14
13:36:05 2001
@@ -19,7 +19,7 @@
## to the Free Software Foundation, Inc., 59 Temple Place, Suite
## 330, Boston, MA 02111-1307 USA
-EXTRA_DIST = README box.c box-module.scm
+EXTRA_DIST = README box.c box-module.scm box-mixed.scm
CFLAGS=`guile-config compile`
LIBS=`guile-config link`
Index: guile/guile-core/examples/box-dynamic-module/README
diff -u guile/guile-core/examples/box-dynamic-module/README:1.2
guile/guile-core/examples/box-dynamic-module/README:1.3
--- guile/guile-core/examples/box-dynamic-module/README:1.2 Wed Jun 6
13:14:51 2001
+++ guile/guile-core/examples/box-dynamic-module/README Thu Jun 14 13:36:05 2001
@@ -1,35 +1,44 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes an example program for extending Guile with a
new (and even useful) data type, putting it into a shared library, so it
can be called from an unmodified guile interpreter. Further, the shared
library defines a new guile module.
+
+* Build Instructions
+
To build the example, simply type
make libbox-module
in this directory.
+
+* The Box Data Type
+
A box is simply an object for storing one other object in. It can be
used for passing parameters by reference, for example. You simply
store an object into a box, pass it to another procedure which can
store a new object into it and thus return a value via the box.
+
+** Usage
+
Box objects are created with `make-box', set with `box-set!' and
examined with `box-ref'. Note that these procedures are placed in a
module called (box-module) and can thus only be accessed after using
-this module. See the following example session for usage details:
+this module. See the following example session for usage details.
+
+** The Module (box-module)
+
Extend your LD_LIBRARY_PATH variable (or equivalent) to include . and
.libs and make sure that your current working directory is the one
this file is contained in.
-If you like this example so much that you want to have it available
-for normal usage, install the dynamic libraries in the .libs directory
-to the directory $(prefix)/lib and the scheme file `box-module.scm' in
-a directory in your GUILE_LOAD_PATH.
-
$ guile
guile> (use-modules (box-module))
guile> (define b (make-box))
@@ -42,3 +51,27 @@
(list of values)
guile> (quit)
$
+
+
+** The Module (box-mixed)
+
+The following example uses the module (box-mixed), also included in
+this directory. It uses the shared library libbox-module like the
+module (box-module) above, but does not export the procedures from
+that module. It only implements some procedures for dealing with box
+objects.
+
+$ guile
+guile> (use-modules (box-mixed))
+guile> (define bl (make-box-list 1 2 3))
+guile> bl
+(#<box 1> #<box 2> #<box 3>)
+guile> (box-map (lambda (el) (make-box-list (list el))) bl)
+(#<box (#<box (1)>)> #<box (#<box (2)>)> #<box (#<box (3)>)>)
+guile> (quit)
+$
+
+If you like this example so much that you want to have it available
+for normal usage, install the dynamic libraries in the .libs directory
+to the directory $(prefix)/lib and the scheme file `box-module.scm' in
+a directory in your GUILE_LOAD_PATH.
Index: guile/guile-core/examples/box-dynamic-module/box-module.scm
diff -u guile/guile-core/examples/box-dynamic-module/box-module.scm:1.1
guile/guile-core/examples/box-dynamic-module/box-module.scm:1.2
--- guile/guile-core/examples/box-dynamic-module/box-module.scm:1.1 Thu Jun
7 05:18:01 2001
+++ guile/guile-core/examples/box-dynamic-module/box-module.scm Thu Jun 14
13:36:05 2001
@@ -1,5 +1,5 @@
-;;; examples/box-dynamic-module/box-module.scm -- Scheme part of the
-;;; dynamic module (box-module)
+;;; examples/box-dynamic-module/box-module.scm -- Scheme module exporting
+;;; some functionality from the shared library libbox-module.
;;; Commentary:
@@ -14,4 +14,12 @@
(define-module (box-module))
+;; First, load the library.
+;;
(load-extension "libbox-module" "scm_init_box")
+
+;; Then export the procedures which should be visible to module users.
+;;
+(export make-box box-ref box-set!)
+
+;;; End of file.
Index: guile/guile-core/examples/box-dynamic-module/box.c
diff -u guile/guile-core/examples/box-dynamic-module/box.c:1.2
guile/guile-core/examples/box-dynamic-module/box.c:1.3
--- guile/guile-core/examples/box-dynamic-module/box.c:1.2 Wed Jun 6
13:14:51 2001
+++ guile/guile-core/examples/box-dynamic-module/box.c Thu Jun 14 13:36:05 2001
@@ -107,14 +107,13 @@
#undef FUNC_NAME
-/* Create and initialize the new smob type, and register the
- primitives withe the interpreter library.
-
- This function must be declared a bit different from the example in
- the ../box directory, because it will be called by
- `scm_c_define_module', called from below. */
-static void
-init_box_type (void * unused)
+/* This is the function which must be given to `load-extension' as the
+ second argument. In this example, the Scheme file box-module.scm
+ (or box-mixed.scm) is responsible for doing the load-extension
+ call. The Scheme modules are also responsible for placing the
+ procedure definitions in the correct module. */
+void
+scm_init_box ()
{
scm_tc16_box = scm_make_smob_type ("box", 0);
scm_set_smob_mark (scm_tc16_box, mark_box);
@@ -123,26 +122,6 @@
scm_c_define_gsubr ("make-box", 0, 0, 0, make_box);
scm_c_define_gsubr ("box-set!", 2, 0, 0, box_set_x);
scm_c_define_gsubr ("box-ref", 1, 0, 0, box_ref);
-
- /* This is new too: Since the procedures are now in a module, we
- have to explicitly export them before they can be used. */
- scm_c_export ("make-box", "box-set!", "box-ref", NULL);
-}
-
-/* This is the function which must be given to `load-extension' as the
- second argument. It will initialize the shared, library, but will
- place the definitions in a module called (box-module), so that an
- additional (use-modules (box-module)) is needed to make them
- accessible. In this example, the Scheme file box-module.scm is
- responsible for doing the load-extension call. */
-void
-scm_init_box ()
-{
- /* Unlike the example in ../box, init_box_type is not called
- directly, but by scm_c_define_module, which will create a module
- named (box-module) and make this module current while called
- init_box_type, thus placing the definitions into that module. */
- scm_c_define_module ("box-module", init_box_type, NULL);
}
/* End of file. */
Index: guile/guile-core/examples/box-dynamic/README
diff -u guile/guile-core/examples/box-dynamic/README:1.1
guile/guile-core/examples/box-dynamic/README:1.2
--- guile/guile-core/examples/box-dynamic/README:1.1 Thu May 31 11:24:11 2001
+++ guile/guile-core/examples/box-dynamic/README Thu Jun 14 13:36:05 2001
@@ -1,20 +1,31 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes an example program for extending Guile with a
new (and even useful) data type, putting it into a shared library, so it
can be called from an unmodified guile interpreter.
+
+* Build Instructions
+
To build the example, simply type
make libbox
in this directory.
+
+* The Box Data Type
+
A box is simply an object for storing one other object in. It can be
used for passing parameters by reference, for example. You simply
store an object into a box, pass it to another procedure which can
store a new object into it and thus return a value via the box.
+
+** Usage
+
Box objects are created with `make-box', set with `box-set!' and
examined with `box-ref'. Note that these procedures are placed in a
module called (box-module) and can thus only be accessed after using
@@ -23,9 +34,8 @@
Extend your LD_LIBRARY_PATH variable (or equivalent) to include . and
.libs
-If you like this example so much that you want to have it available
-for normal usage, install the dynamic libraries in the .libs directory
-to the directory $(prefix)/lib
+
+** Example Session
$ ./guile
guile> (load-extension "libbox" "scm_init_box")
@@ -39,3 +49,10 @@
(list of values)
guile> (quit)
$
+
+
+* Module Installation
+
+If you like this example so much that you want to have it available
+for normal usage, install the dynamic libraries in the .libs directory
+to the directory $(prefix)/lib
Index: guile/guile-core/examples/box-module/README
diff -u guile/guile-core/examples/box-module/README:1.1
guile/guile-core/examples/box-module/README:1.2
--- guile/guile-core/examples/box-module/README:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/box-module/README Thu Jun 14 13:36:05 2001
@@ -1,5 +1,7 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes an example program for extending Guile with a
new (and even useful) data type.
@@ -9,6 +11,9 @@
procedures in a module called (box-module). That means that this
module must be used before the primitives can be accessed.
+
+* Build Instructions
+
To build the example, simply type
make box
@@ -18,15 +23,24 @@
The resulting `box' program is a Guile interpreter which has one
additional data type called `box'.
+
+* The Box Data Type
+
A box is simply an object for storing one other object in. It can be
used for passing parameters by reference, for example. You simply
store an object into a box, pass it to another procedure which can
store a new object into it and thus return a value via the box.
+
+** Usage
+
Box objects are created with `make-box', set with `box-set!' and
examined with `box-ref'. Note that these procedures are placed in a
module called (box-module) and can thus only be accessed after using
this module. See the following example session for usage details:
+
+
+** Example Session
$ ./box
guile> (use-modules (box-module))
Index: guile/guile-core/examples/box/README
diff -u guile/guile-core/examples/box/README:1.1
guile/guile-core/examples/box/README:1.2
--- guile/guile-core/examples/box/README:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/box/README Thu Jun 14 13:36:05 2001
@@ -1,8 +1,13 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes an example program for extending Guile with a
new (and even useful) data type.
+
+* Build Instructions
+
To build the example, simply type
make box
@@ -12,14 +17,23 @@
The resulting `box' program is a Guile interpreter which has one
additional data type called `box'.
+
+* The Box Data Type
+
A box is simply an object for storing one other object in. It can be
used for passing parameters by reference, for example. You simply
store an object into a box, pass it to another procedure which can
store a new object into it and thus return a value via the box.
+
+** Usage
+
Box objects are created with `make-box', set with `box-set!' and
examined with `box-ref'. See the following example session for usage
details:
+
+
+** Example Session
$ ./box
guile> (define b (make-box))
Index: guile/guile-core/examples/modules/README
diff -u guile/guile-core/examples/modules/README:1.1
guile/guile-core/examples/modules/README:1.2
--- guile/guile-core/examples/modules/README:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/modules/README Thu Jun 14 13:36:05 2001
@@ -1,13 +1,19 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes examples which show how to write and use Guile
modules in Scheme programs.
The descriptions below assume that you have a working copy of Guile
installed and available with the standard installation prefix
`/usr/local'.
+
+
+* Included Examples
+
-main:
+** main
The main program, which uses the modules described below to perform
some actions. Module usage and selective importing as well as
@@ -19,7 +25,7 @@
guile -s main
-module-0.scm, module-1.scm, module-2.scm:
+** module-0.scm, module-1.scm, module-2.scm
Two modules which export several procedure, some of which have the
same names (so that renaming/selection is required for proper
Index: guile/guile-core/examples/modules/module-0.scm
diff -u guile/guile-core/examples/modules/module-0.scm:1.1
guile/guile-core/examples/modules/module-0.scm:1.2
--- guile/guile-core/examples/modules/module-0.scm:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/modules/module-0.scm Thu Jun 14 13:36:05 2001
@@ -20,3 +20,5 @@
(define (bar)
(display "module-0 bar")
(newline))
+
+;;; End of file.
Index: guile/guile-core/examples/modules/module-1.scm
diff -u guile/guile-core/examples/modules/module-1.scm:1.1
guile/guile-core/examples/modules/module-1.scm:1.2
--- guile/guile-core/examples/modules/module-1.scm:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/modules/module-1.scm Thu Jun 14 13:36:05 2001
@@ -20,3 +20,5 @@
(define (bar)
(display "module-1 bar")
(newline))
+
+;;; End of file.
Index: guile/guile-core/examples/modules/module-2.scm
diff -u guile/guile-core/examples/modules/module-2.scm:1.1
guile/guile-core/examples/modules/module-2.scm:1.2
--- guile/guile-core/examples/modules/module-2.scm:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/modules/module-2.scm Thu Jun 14 13:36:05 2001
@@ -24,3 +24,5 @@
(define (braz)
(display "module-2 braz")
(newline))
+
+;;; End of file.
Index: guile/guile-core/examples/safe/README
diff -u guile/guile-core/examples/safe/README:1.1
guile/guile-core/examples/safe/README:1.2
--- guile/guile-core/examples/safe/README:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/safe/README Thu Jun 14 13:36:05 2001
@@ -1,5 +1,7 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes examples which show how to create and use safe
environments for safe (sand-boxed) execution of Scheme programs.
@@ -11,8 +13,11 @@
The descriptions below assume that you have a working copy of Guile
installed and available with the standard installation prefix
`/usr/local'.
+
+* Included Examples
+
-safe:
+** safe
The main program, which executes the Scheme code in a file given on
the command line in a safe environment. The following command will
@@ -24,12 +29,12 @@
guile -s safe untrusted.scm
-untrusted.scm:
+** untrusted.scm
This file contains some Scheme code, which will be executed in a
safe environment by the `safe' script.
-evil.scm
+** evil.scm
This file also contains Scheme code, but it tries to do evil things.
Evaluating this with the `safe' script will abort on those evil
Index: guile/guile-core/examples/safe/evil.scm
diff -u guile/guile-core/examples/safe/evil.scm:1.1
guile/guile-core/examples/safe/evil.scm:1.2
--- guile/guile-core/examples/safe/evil.scm:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/safe/evil.scm Thu Jun 14 13:36:05 2001
@@ -23,3 +23,5 @@
(let lp ((ch (read-char passwd)))
(if (not (eof-object? ch))
(lp (read-char passwd))))
+
+;;; End of file.
Index: guile/guile-core/examples/safe/untrusted.scm
diff -u guile/guile-core/examples/safe/untrusted.scm:1.1
guile/guile-core/examples/safe/untrusted.scm:1.2
--- guile/guile-core/examples/safe/untrusted.scm:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/safe/untrusted.scm Thu Jun 14 13:36:05 2001
@@ -29,3 +29,5 @@
((= x 11))
(display (fact x))
(newline))
+
+;;; End of file.
Index: guile/guile-core/examples/scripts/README
diff -u guile/guile-core/examples/scripts/README:1.1
guile/guile-core/examples/scripts/README:1.2
--- guile/guile-core/examples/scripts/README:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/scripts/README Thu Jun 14 13:36:05 2001
@@ -1,19 +1,24 @@
- -*- text -*-
+ -*- outline -*-
+* Overview
+
This directory includes examples which show how to write scripts using
Guile.
The descriptions below assume that you have a working copy of Guile
installed and available with the standard installation prefix
`/usr/local'.
+
+* Included Examples
+
-simple-hello.scm:
+** simple-hello.scm
The simplest "Hello World!" program for Guile. Run it like this:
$ guile -s simple-hello.scm
-hello:
+** hello
An advanced version of the script above, with command line handling
for the important options --help and --version. Run it like this:
@@ -24,7 +29,7 @@
guile -s hello
-fact:
+** fact
Command-line factorial calculator. Run it like this:
Index: guile/guile-core/examples/scripts/fact
diff -u guile/guile-core/examples/scripts/fact:1.1
guile/guile-core/examples/scripts/fact:1.2
--- guile/guile-core/examples/scripts/fact:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/scripts/fact Thu Jun 14 13:36:06 2001
@@ -67,4 +67,3 @@
;; Local variables:
;; mode: scheme
;; End:
-
Index: guile/guile-core/examples/scripts/hello
diff -u guile/guile-core/examples/scripts/hello:1.1
guile/guile-core/examples/scripts/hello:1.2
--- guile/guile-core/examples/scripts/hello:1.1 Thu May 31 08:54:25 2001
+++ guile/guile-core/examples/scripts/hello Thu Jun 14 13:36:06 2001
@@ -55,4 +55,3 @@
;; Local variables:
;; mode: scheme
;; End:
-
Index: guile/guile-core/examples/scripts/simple-hello.scm
diff -u guile/guile-core/examples/scripts/simple-hello.scm:1.1
guile/guile-core/examples/scripts/simple-hello.scm:1.2
--- guile/guile-core/examples/scripts/simple-hello.scm:1.1 Thu May 31
08:54:25 2001
+++ guile/guile-core/examples/scripts/simple-hello.scm Thu Jun 14 13:36:06 2001
@@ -12,3 +12,5 @@
(display "Hello, World!")
(newline)
+
+;;; End of file.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- guile/guile-core/examples ChangeLog README box/...,
Martin Grabmueller <=