\parindent=1em
%A box around the argument, like for a value of a variable
\newcommand{\varframe}[1]{\frame{\raisebox{0ex}[.5ex][.5ex]{} #1 }}

\newcommand{\keybyte} {\texttt{\textbf byte}}
\newcommand{\keyshort} {\texttt{\textbf short}}
\newcommand{\keyint} {\texttt{\textbf int}}
\newcommand{\keylong} {\texttt{\textbf long}}
\newcommand{\keychar} {\texttt{\textbf char}}
\newcommand{\keybool} {\texttt{\textbf bool}}
\newcommand{\keyfloat} {\texttt{\textbf float}}
\newcommand{\keydouble} {\texttt{\textbf double}}

\newcommand{\termdef}[1]{Definition of #1:
{\framebox[.5ex][.5ex]{\hspace{4in}}}}

\setcounter{chapter}{-1}

%% Macros for drawing "underline" rules and half-boxes.
\newcommand{\urule}[2][.5pt]{\rule[-2pt]{#2}{#1}} % "underline" rule
    %%Example:  \urule{2in}{This is to the right}

\newcommand{\hb}{\urule{1.5em}}                   % horizontal bar
\newcommand{\vb}{\urule[1ex]{.5pt}}               % vertical bar
\newcommand{\blankfill}[1]{\underline{\hspace{#1}}}

%% Macros for making checkboxes and checklists.
\newcommand{\cbox}[1]{{\fboxrule.125ex\fboxsep0ex
   \framebox[2.75ex]{\rule[-.75ex]{0ex}{2.75ex}\smash{#1}}}}
\newcommand{\cmark}{\raisebox{.0625ex}{$\surd$\kern.125ex}}
\newcommand{\xmark}{\raisebox{-.1875ex}{\kern.0625ex{X}}}
\newcommand{\checkbox}{{\sf\cbox{}}}
\newcommand{\checkedbox}{{\sf\cbox{\cmark}}}
\newcommand{\markedbox}{{\sf\cbox{\xmark}}}
\newenvironment{checklist}{\begin{list}{\checkbox}{}}{\end{list}}
\newcommand{\checkeditem}{\item[\checkedbox]}
\newcommand{\markeditem}{\item[\markedbox]}
 
%% Various symbols.
\newcommand{\lcurl}{\symbol{"7B}} % left curly bracket {
\newcommand{\rcurl}{\symbol{"7D}} % right curly bracket }
\newcommand{\ie}{\emph{i.e.}}
\newcommand{\eg}{\emph{e.g.}}
\newcommand{\NN}{\mathbb{N}} % requires `amssymb'
\newcommand{\ZZ}{\mathbb{Z}} % requires `amssymb'
\newcommand{\RR}{\mathbb{R}} % requires `amssymb'
\newcommand{\bigOh}{\mathcal{O}}
\newcommand{\goesto}{\rightarrow}
 
\newcommand{\note}[2][.25in]{
  \framebox{
    \begin{minipage}[t]{.75\textwidth}
      #2\vspace{#1}
    \end{minipage}}
    \\}
    
%% Fill-in-the-blank word definition
%\newcommand{\defn}[1]{\noindent\note{Definition of \textit{#1\/}:}}
    \newcommand{\defn}[2][.25in]{
    \noindent Definition of \textit{#2}:\vspace{#1}}

%% Complete-the-phrase
\newcommand{\phrase}[2][.25in]{\noindent#2\vspace{#1}}

      %% Complete-the-phrase
\newcommand{\oldphrase}[2][.25in]{
%  \framebox{
    \begin{minipage}[t]{.75\textwidth}
      \noindent#2\vspace{#1}
    \end{minipage} %}
      \\}

\newcommand{\truefalse}[1]{
  %\framebox{
      #1\\
      \checkbox{\texttt{true}}\hspace{.5in}\checkbox{\texttt{false}}
  }

\newcommand{\oldtruefalse}[1]{
  %\framebox{
    \begin{minipage}[t]{.75\textwidth}
      #1\\
      \checkbox{\texttt{true}}\hspace{.5in}\checkbox{\texttt{false}}
    \end{minipage} %}
    \\
  }

\newcommand{\pl}{\emph{ProgramLive}}
\newenvironment{exercise}[1]%
  { \textbf{Programming exercise:}
    #1 }


\let\code=\texttt

