This directory contains the distribution of scm.  Scm conforms to
Revised^3.99 Report on the Algorithmic Language Scheme [Draft August
31, 1989] and the IEEE specification.  Scm runs under Unix, VMS, and
Microsoft C on IBM PCs.

  The file `scm.exe', if present, is an IBM PC executable of scm.
  `public.lic' details the LACK OF WARRANTY for scm and the conditions
	for distributing scm.
  `test.scm' is Scheme code which tests conformance with Scheme
	specifications.  (test-cont) will not work on VAX or SUN4
	systems (they #define CHEAP_CONTINUATIONS).
  `fib.scm' is Scheme code for fibonacci [type (fib 20)] which can be
	used to test the performance of scm against compiled C code
	[type (cfib 20)].
  `utils.scm' contains Scheme code for tracing functions as well as
	provide and require.
  `code.doc' describes the internal representations and algorithms.
	Also describes how to modify scm.
  `makefile' is the file for building scm using the `make' program.
  `makefile.msc' is the file for building scm on an IBM PC using
	microsoft C.
  `makefile.bor' is the file for building scm on an IBM PC using
	Borland Turbo C.
  `config.h' is a C include file containing system dependent definitions.
	If scm doesn't run correctly look at this file first.
  `scm.h' has the data type and external definitions of scm.
  `scm.c' has the top level, error, interrupt, load, and cfib code.
  `scl.c' has the code for utility functions which are not part of the
	IEEE Scheme spec.
  `eval.c' has the evaluator, special functions, apply, map, and foreach.
  `sys.c' has the code for call-with-current-continuation, input and
	output,	storage allocation and garbage collection.
  `subr.c' has all the rest of functions.

			   Using the System

Typing: `scm [file1] [file2] ...'  will load all the files given as
arguments into scm.  Scm will then evaluate and print any expression
typed into it.  If files are given verbose mode will initially be off;
if not, verbose mode will initially be on.

Scm has some features not required by the IEEE and Revised^3.99
specifications:

  (Quit) or the end-of-file character at top level exits from scm.

  Typing control-c stops any computation and returns you to top level.

  If scm encounters a non-fatal error it returns you to top level and
the value of `errobj' is the offending object if appropriate.

  (Verbose #t) turns on monitoring of heap allocation and collection
and elapsed time.

  (Verbose #f) turns off monitoring.

  (Gc) does a garbage collection.

  Typing (warranty) or (terms) displays the GNU General Public License.

  (List-file "<filename>") displays the contents of <filename>.

  (Error arg1 arg2 arg3 ...) outputs an error message containing the
arguments and returns you to top level.

  (System "command arg1 arg2 ...") executes the command on the
computer and return the status code (integer).

  If scm is compiled under VMS typing (edit) or (vms-debug) invokes
the editor or debugger respectively.

			    IO_EXTENSIONS

  If IO_EXTENSIONS is #defined in config.h or the makefile the
following functions are also defined:

  (open-io-file <filename>)				procedure
  (call-with-io-file <filename> <procedure>)		procedure
  (close-io-file <port>)				procedure

These functions are analogous to the standard scheme file functions.
The ports are open to <filename> in read/write mode.  Both input and
output functions can be used with io-ports.  An end of file must be
read or a file-set-position done on the port between a read operation
and a write operation or vice-versa.

  (file-position <port>)				procedure

Returns the current position of the character in <port> which will
next be read or written.  If <port> is not open to a file the result
is unspecified.

  (file-set-position <port> <integer>)			procedure

Sets the current position in <port> which will next be read or
written.  If <port> is not open to a file the action of
file-set-position is unspecified.  The result of file-set-position is
unspecified.

  (read-string! <string>)				procedure
  (read-string! <string> <port>)			procedure

Reads (string-length <string>) characters from <port>.  If an end of
file is encountered during read-string! the characters up to that
point only are put into string (starting at the beginning) and the
remainder of the string is unchanged.

Read-string! returns the number of characters read.  <Port> may be
omitted, in which case it defaults to the value returned by
current-input-port.
