diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 04:55:05 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2011-10-14 04:55:05 +0200 |
commit | 6aa0e0017d7d0cddc006da885946934b06949a91 (patch) | |
tree | 66b688ec32e2f91266db760b1762f2a50cc52036 /libslang/demo/README | |
parent | a966db5b71328f6adf9dd767e64b322a3bd7ed9c (diff) | |
download | erlang-slang-fork-6aa0e0017d7d0cddc006da885946934b06949a91.tar.gz |
include libslang-1.4.9 and automatically build it and link erlang-slang against it
few (erlang) people will still have libslang-1.4.9 installed or spend time
to get it to link against the driver
Diffstat (limited to 'libslang/demo/README')
-rw-r--r-- | libslang/demo/README | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libslang/demo/README b/libslang/demo/README new file mode 100644 index 0000000..f50f7b0 --- /dev/null +++ b/libslang/demo/README @@ -0,0 +1,43 @@ +What's here? + +Each C file in this directory are heavily commented examples that illustrate +only one or two S-Lang features. Some C files are accompanied by a .sl file +that contains S-Lang code relevant to the example. + +If you find these demos confusing, please let me know so I can work on +improving them. + +Please note that these demos WILL NOT WORK under msdos unless the S-lang +library is compiled with the -DFLOAT_TYPE option. + +--------------------------------------------------------------------------- +pager.c: A simple file pager demo. Use pageup/down keys to scroll + through the file. It illustrates the SLsmg, SLsig, SLkp, + and SLscroll routines of the S-Lang library. This example + should be contrasted with the curses demo ../src/curses/view.c. + +keypad.c: Illustrates the slkeypad facility. + +simple.c: This file contains slightly more than the miniumum required to + embed S-Lang. It loads a file specified on the command line. + +simple.sl: An S-Lang script that prompts for a filename and returns + information about the file. Use this with the `simple' + executable. + +array.c: This example shows how to embed a C array into S-Lang allowing + access to the array from a S-Lang script. +array.sl: This script reads and writes the array specified in array.c. + +useropen.c This example shows how to specify an object that S-Lang will + interpret. S-lang already knows how to interpret code contained + in strings and files. Interpreting code from a `readline' + structure is illustrated here. The demo in ../src/calc.c uses + this technique to interpret data from S-Lang's readline routines. + +complex.c Adding an application defined data type is the focus of this + example. Specifically, a complex number type is added and the + binary and unary operators are overloaded to work with the new + type. +complex.sl A script that manipulates the complex number type defined in + complex.c. |