\documentclass{article}
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Steven B. Segletes.
%
\pagestyle{empty}
\usepackage{verbatimbox}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\parskip 1em

This is a test of the \textsf{verbatimbox} style package, to 
test the \verb,verbbox, environment.  I am about to call on the
\verb,verbbox, environment to see how if I can stuff \verb,verbatim,
text into a \LaTeX{} box.  Here goes...

\begin{verbbox}[\footnotesize]
      Program test
      implicit none
      integer a, x
      a = 0
      x = 1
   10 a = a + x
      if (a .eq. 100) stop
      goto 10
      end
!@#$%^&*()_+=-{}|\][<>?/\\\
\end{verbbox}

OK, I have created a \verb,verbbox, (which creates no output in and of
itself).  When doing so, I used an optional argument of
\verb,\footnotesize,. I now wish to see if I can stick it into a
\verb,tabular, environment.  Note, when sticking a verbbox into the
\verb,tabular, environment, use the \verb,[t], option of \verb,\theverbbox,.

\begin{center}
\begin{tabular}{| c | c | c |}
\hline
\raisebox{0.7in}{First box of table}&%
\theverbbox[t] &
\raisebox{0.7in}{last box of table}\\
\hline
\end{tabular}
\end{center}

Otherwise, if I choose, I can just stick the \verb,verbatim, box into an
\verb,fbox,,
so as to frame the result.  This latter case produces the same output as
would the \verb,boxedverbatim, environment in the \textsf{moreverb}
package.

\fbox{\theverbbox}

Being a box, I can use \verb,verbbox, output as part of a figure or
table, for example.  Bottom line: the \textsf{verbatimbox} package
provides nice flexibility in utilizing the \verb,verbatim, environment
in a variety of ways, including some places where \verb,verbatim, would
not otherwise be allowed.

Finally, the \verb,\verbfilebox, command acts just like the
\verb,verbbox, environment, except that it takes as its input the
contents of a file (provided as the mandatory argument to the command).
Like, the \verb,verbbox, environment, the \verb,\verbfilebox, command
also has an optional argument through which things like font size of
\verb,\theverbbox, can be altered.

\end{document}
