Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/src/cm/Doc/12-smlcmdline.tex
ViewVC logotype

View of /sml/trunk/src/cm/Doc/12-smlcmdline.tex

Parent Directory Parent Directory | Revision Log Revision Log

Revision 742 - (download) (as text) (annotate)
Thu Nov 30 14:09:32 2000 UTC (19 years, 6 months ago) by blume
File size: 2506 byte(s)
merging changes from private branch
% -*- latex -*-

\section{The {\tt sml} command line}

The SML/NJ interactive system---including CM---is started from the
operating system shell by invoking the command {\tt sml}.
This section describes those arguments accepted by {\tt sml} that
are related to (and processed by) CM.

CM accepts {\em file names}, {\em mode switching flags}, and {\em
preprocessor definitions} as arguments.  All these arguments are
processed one-by-one from left to right.

\subsection{File arguments}

Names of ML source files and CM description files can appear as
arguments in any order.

\item[ML source files] are recognized by their filename extensions
({\tt .sig}, {\tt .sml}, or {\tt .fun}) and cause the named file to be
loaded via {\tt use} at the time the argument is being considered.
Names of ML source files are specified using the underlying operating
system's native pathname syntax.
\item[CM description files] are recognized by their extension {\tt
.cm}.  They must be specified in CM's {\em standard} pathname syntax.
At the time the argument is being considered, the named library (or
group) will be loaded by passing the name to either {\tt CM.autoload}
or {\tt CM.make}---depending on which {\em mode switching flag} ({\tt
-a} or {\tt -m}) was specified last.  The default is {\tt -a} (i.e.,
{\tt CM.autoload}).

\subsection{Mode-switching flags}

By default, CM description files are loaded via {\tt CM.autoload}.  By
specifying {\tt -m} somewhere on the command line one can force the
system to use {\tt CM.make} for all following description files up to
the next occurence of {\tt -a}.  The {\tt -a} flag switches back to
the default behavior, using {\tt CM.autoload}, which will then again
be in effect up to the next occurrence of another {\tt -m}.

Mode-switching flags can be specified arbitrarily often on the same
command line.

\subsection{Defining and undefining CM preprocessor symbols}

The following options for defining and undefining CM preprocessor
symbols can also occur arbitrarily often.  Their effects accumulate
while processing the command line from left to right.  The resulting
final state of the internal preprocessor registry becomes observable
in the interactive system.

\item[{\tt -D$v$=$n$}] acts like {\tt (\#set (CM.symval "$v$") (SOME $n$))}.
\item[{\tt -D$v$}] is equivalent to {\tt -D$v$=1}.
\item[{\tt -U$v$}] acts like {\tt (\#set (CM.symval "$v$") NONE)}.

ViewVC Help
Powered by ViewVC 1.0.0