%$Id: merge.tex,v 25.95 2006/08/26 01:26:53 al Exp $ -*- LaTeX -*-
% man commands merge .
% Copyright (C) 2001 Albert Davis
% Author: Albert Davis <aldavis@ieee.org>
%
% This file is part of "Gnucap", the Gnu Circuit Analysis Package
%
% This program is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2, or (at your option)
% any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
% 02110-1301, USA.
%------------------------------------------------------------------------
\section{{\tt MERGE} command}
\index{merge command}
\index{load circuit from file}
\index{read circuit from file}
\index{retrieve circuit from file}
\index{file: get}
\index{file: merge}
\index{file: read}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt merge} {\it filename}
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Gets an existing circuit file, without clearing memory.
%------------------------------------------------------------------------
\subsection{Comments}

The first comment line of the file being read is the new title, and replaces
the existing title.

Comments in the circuit file are stored, unless they start with {\tt *+} in
which case they are thrown away.

`Dot cards' are set up, but not executed.  This means that variables and
options are changed, but simulation commands are not actually done.  As
an example, the {\tt options} command is actually performed, since it only
sets up variables.  The {\tt ac} command is not performed, but its parameters
are stored, so that a plain {\tt ac} command will perform the analysis
specified in the file.

Any circuit already in memory is kept.  New elements with duplicate labels
replace the old ones.  New elements that are not duplicates are added to the
end of the list, as if the files were appended.
%------------------------------------------------------------------------
\subsection{Examples}

\begin{description}

\item[{\tt merge amp.ckt}] Get the circuit file {\tt amp.ckt} from
the current directory.  Use it to change the circuit in memory.

\item[{\tt merge npn.mod}] Include the file {\tt npn.mod}.

\end{description}
%------------------------------------------------------------------------
%------------------------------------------------------------------------
