• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Makefile.inH A D04-Mar-20182.6 KiB7040

Makefile.w32H A D04-Mar-2018206 76

READMEH A D04-Mar-20182 KiB4433

demolib.cH A D04-Mar-20181.6 KiB9974

keypad.cH A D04-Mar-2018919 5233

pager.cH A D04-Mar-20185.6 KiB279201

rline.cH A D04-Mar-20183.5 KiB180153

smgtest.cH A D04-Mar-201821.4 KiB981813

useropen.cH A D04-Mar-20183.1 KiB11767

README

1What's here?
2
3Each C file in this directory are heavily commented examples that illustrate
4only one or two S-Lang features.  Some C files are accompanied by a .sl file
5that contains S-Lang code relevant to the example.
6
7If you find these demos confusing, please let me know so I can work on
8improving them.
9
10Please note that these demos WILL NOT WORK under msdos unless the S-lang
11library is compiled with the -DFLOAT_TYPE option.
12
13---------------------------------------------------------------------------
14pager.c:    A simple file pager demo.  Use pageup/down keys to scroll
15            through the file.  It illustrates the SLsmg, SLsig, SLkp,
16	    and SLscroll routines of the S-Lang library.  This example
17	    should be contrasted with the curses demo ../src/curses/view.c.
18
19keypad.c:   Illustrates the slkeypad facility.
20
21simple.c:   This file contains slightly more than the miniumum required to
22	    embed S-Lang.  It loads a file specified on the command line.
23
24simple.sl:  An S-Lang script that prompts for a filename and returns
25            information about the file.  Use this with the `simple'
26	    executable.
27
28array.c:    This example shows how to embed a C array into S-Lang allowing
29            access to the array from a S-Lang script.
30array.sl:   This script reads and writes the array specified in array.c.
31
32useropen.c  This example shows how to specify an object that S-Lang will
33	    interpret.  S-lang already knows how to interpret code contained
34	    in strings and files.  Interpreting code from a `readline'
35	    structure is illustrated here.  The demo in ../src/calc.c uses
36	    this technique to interpret data from S-Lang's readline routines.
37
38complex.c   Adding an application defined data type is the focus of this
39            example.  Specifically, a complex number type is added and the
40	    binary and unary operators are overloaded to work with the new
41	    type.
42complex.sl  A script that manipulates the complex number type defined in
43            complex.c.
44