.BG
.VE $Header: /usr3/s/current/s/.help/RCS/source,v 1.2 83/12/30 19:34:41 rab Exp $
.FN source
.TL
source: Execute S Expressions from a File
.CS
source(file, return)
.PP
.AG file
character string giving the name of a file.  Commands are
read from the file, instead of from the terminal.  This
continues until an end-of-file is encountered, until any
error (syntax or execution) is generated, or until `source'
with a null argument is encountered.  The argument
`sourcexit' to function `options' can be used to allow
execution to continue after errors in a source file.
.AG return
logical, after completing the actions contained in `file',
should execution return to the context it was in prior to executing `source'.
Default TRUE.
Using `return=FALSE' is recommended if the `source' invocation is
the last action of a macro or source file, since it
prevents a (growing) stack of source files, which may eventually use
up all available file descriptors.
.PP
Source files can themselves invoke source files, macros, etc.
.PP
Generally, nothing should follow the source command on the same
line or an anomalous effect may occur;
for example,
.br
`source("abc"); 1+2'
.br
will evaluate `1+2' before reading anything from
file "abc".
Similarly, `source' should not be used inside loops.
.KW basic*
.KW file
.KW macros
.WR
