Commit 59f00d6c authored by paysan's avatar paysan

Fixed wrong PDF links

parent fcfe0c24
......@@ -25,8 +25,7 @@ state-of-the-art programming principles.
% These all need to be on page without the start of
% a range of the same name.
\index{C!Control structures:!minimization of|see{Control
structure minimization}}%
\index{C!Control structures:!minimization of|see{Control structure minimization}}%
\index{D!Data handling|see{Data stacks, Data structures}}%
\index{D!Data structures:|seealso{Variables}}%
\index{D!Design|see{Detailed design, Preliminary design}}%
......@@ -1064,7 +1063,7 @@ feature allows the data structures within a component to be described
in terms of previously-defined components. This feature is direct
access memory.
Suppose we define a variable called \forth{APPLES}, like this:\label{apples1}
Suppose we define a variable called \forth{APPLES}, like this:\program{apples1}
......@@ -1175,7 +1174,7 @@ GREEN APPLES ?
value in trying to determine what part of speech a particular word is,
since \Forth{} doesn't care anyway. We need only enjoy the ease of
describing an application in natural terms.%
\index{D!Data structures:!hiding construction of|)}
......@@ -798,7 +798,7 @@ practice, and I've had more practice.
\index{A!Analysis!rule definition|(}%
\index{C!Conceptual model!rule definition|(}%
\index{R!Rule definition|(}%
Most of your efforts at defining a problem will center on describing
the interface.%
......@@ -1126,7 +1126,7 @@ to a running \Forth{} application. But it is only pseudocode. We've
avoided stack manipulations by assuming that values will somehow be on
the stack where the comments indicate. Also, we've used hyphenated
names because they might be more readable for the customer. Short
names are preferred in real code---see \Chap{5}.)\label{phone2}
names are preferred in real code---see \Chap{5}.)\program{phone2}
We'll unveil the finished code for this example in \Chap{8}.%
\index{A!Analysis!decision table|)}%
......@@ -143,7 +143,7 @@ chance that it will change, you're better off hiding it behind a name:
(The name \forth{/RECORD}, by convention, means ``bytes per record.'')
\section{Example: A Tiny Editor}\label{editor1}
\section{Example: A Tiny Editor}\program{editor1}
Let's apply decomposition by component to a real problem. It would be
nice to design a large application right here in \Chap{3}, but alas, we
......@@ -570,7 +570,7 @@ component. Also we used \forth{OVERWRITE} inside \forth{INSERT}.
By decomposing our application into components which use one another,
we achieved not only \emph{elegance} but a more direct path to
\section{The Interface Component}%
\index{I!Interface component|(}
......@@ -676,7 +676,7 @@ light-blue with 9. You want to define two words: \forth{BLUE} will return
1; \forth{LIGHT} may precede \forth{BLUE} to produce 9.
In \Forth{}, it would be possible to define \forth{BLUE} as a constant, so
that when executed it always returns 1.\label{color1}
that when executed it always returns 1.\program{color1}
......@@ -988,7 +988,7 @@ structure:
& \emph{Full Rate} & \emph{Lower Rate} & \emph{Lowest Rate} \\ \hline
First Min. & .30 & .22 & .12 \\ \hline
Add'1 Mins. & .12 & .10 & .06 \\ \hline
\noindent Using a data structure was simpler than trying to invent a
......@@ -996,7 +996,7 @@ formula by which these values could be calculated. And the formula might
prove wrong later. In this case, table-driven code is easier to maintain.
In \Chap{3} we designed a keystroke interpreter for our Tiny
Editor using a decision table:\label{editor3}
Editor using a decision table:\program{editor3}
%!! this should be a table; see pg 119
%%typo: The original has here ``Cntrl''. Usually, it's Ctrl, and other chapters
......@@ -1057,7 +1057,7 @@ application.
\section{Solving a Problem: Computing Roman Numerals}%
\index{D!Detailed design!demonstration of|(}%
\index{R!Roman numeral computation problem|(}%
In this section we'll attempt to demonstrate the process of designing a
lexicon. Rather than merely present the problem and its solution, I'm
......@@ -1774,7 +1774,7 @@ VARIABLE COLUMN# ( current offset)
\index{R!Roman numeral computation problem|)}%
......@@ -333,7 +333,7 @@ If a series of definitions contains identical functions, with
variation only in data, use a defining word.
Examine the structure of this code (without worrying about its
purpose---you'll see the same example later on):\label{color2}
purpose---you'll see the same example later on):\program{color2}
: HUE ( color -- color')
......@@ -718,7 +718,7 @@ We find another example of failing to factor the output function from
the calculation function in our own Roman numeral example in \Chap{4}.
Given our solution, we can't store a Roman numeral in a buffer or
even center it in a field. (A better approach would have been to use
\forthb{HOLD} instead of \forthb{EMIT}.)\label{roman3}
\forthb{HOLD} instead of \forthb{EMIT}.)\program{roman3}
Information hiding can also be a reason \emph{not} to factor. For
instance, if you factor the phrase
......@@ -922,7 +922,7 @@ We notice that the colors between 8 and 15 are all ``lighter''
versions of the colors between 0 and 7. (In the hardware, the only
difference between these two sets is the setting of the ``intensity
bit.'') If we factor out the ``lightness,'' we might come up with this
VARIABLE 'LIGHT? ( intensity bit?)
......@@ -954,7 +954,7 @@ If necessary for readability, we still might want to define:
Again, through this approach we've achieved a more pleasant syntax and
shorter object code.\label{color4}
shorter object code.\program{color4}
\index{C!Commands, reducing number of|)}
......@@ -1017,7 +1017,7 @@ We can also apply limited redundancy during compilation, by letting
For maximum maintainability, limit redundancy even at compile time.
Suppose in our application we must draw nine boxes as shown in
\caption{What we're supposed to display}
......@@ -1135,7 +1135,7 @@ coordinates in the table: this value becomes the constant
This construct lets you add or subtract points from the table without
worrying about the number of points there are. \Forth{} computes this
for you.\label{boxes2}
for you.\program{boxes2}
\subsection{Compile-Time Factoring through Defining Words}%
\index{D!Defining words:!compile-time factoring through}
......@@ -1243,7 +1243,7 @@ a box at a given x--y coordinate. (This is the same problem we
introduced in the section called ``Compile-Time Factoring.'')
At first we focus our attention on the problem of drawing a
box---never mind erasing it. We might come up with this:\label{boxes3}
box---never mind erasing it. We might come up with this:\program{boxes3}
......@@ -98,7 +98,7 @@ long-term consequences of the conditional.
Before we introduce some detailed techniques, let's look at three
approaches to the use of conditionals in a particular example.
\Fig{fig8-1}, \Fig{fig8-2}, and \Fig{fig8-3} illustrate three versions of
a design for an automatic teller machine.\label{teller1}
a design for an automatic teller machine.\program{teller1}
\verbfig{fig8-1}{The structured approach.}
......@@ -259,7 +259,7 @@ dependent on hardware. Details of the interface to the keypad may be
hidden within the keypad lexicon, \code{READ-BUTTON} and \code{BUTTON}.)
Of course, \Forth{} will allow you to take any of the three approaches.
Which do you prefer?\label{teller2}
Which do you prefer?\program{teller2}
\section{How to Eliminate Control Structures}
......@@ -1001,7 +1001,7 @@ Another example of the one-dimensional data table is the ``superstring''
\subsubsection{Two-Dimensional Data Table}%
\index{T!Two-dimensional data table|(}%
In \Chap{2} we presented a phone-rate problem. \Fig{fig8-4} gives one
solution to the problem, using a two-dimensional data structure.
......@@ -1062,11 +1062,11 @@ approach eliminates the need for a multiplication that would otherwise be
needed to implement a two-dimensional structure. The multiplication can be
prohibitively slow in certain cases.%
\index{T!Two-dimensional data table|)}%
\subsubsection{Two-Dimensional Decision Table}%
\index{T!Two-dimensional decision table|(}%
We'll hark back to our Tiny Editor example in \Chap{3} to illustrate
a two-dimensional decision table.
......@@ -1216,7 +1216,7 @@ manipulation. A simpler solution that uses no local variable is:
(We'll offer still another solution later in this chapter, under ``Using
Structured Exits.'')%
\index{T!Two-dimensional decision table|)}%
\section{Decision Tables for Speed}
......@@ -1628,7 +1628,7 @@ Criteria'' illustrates this point.
The purpose of the word \forth{LIGHT} is to set a flag which indicates
whether we want the intensity bit to be set or not. While we could have
......@@ -1727,7 +1727,7 @@ DOER !' ( vectorable ! )
DOER CMOVE' ( vectorable CMOVE )
DOER FILL' ( vectorable FILL )
......@@ -1790,7 +1790,7 @@ Because flags in memory are variables, they are not reentrant.
An example of a case in which we might reconsider the need for a flag is
one we've seen several times already. In our ``colors'' example we made
the assumption that the best syntax would be:\label{color5}
the assumption that the best syntax would be:\program{color5}
\initial Programming computers can be crazy-making. Other professions give
\chapter*{Preface to the 2004 Edition}
\addcontentsline{toc}{section}{Preface to the 2004 Edition}
\markboth{Preface to the 2004 Edition}{Preface to the 2004 Edition}
\initial It is an honor to find myself writing a preface again, twenty years
\chapter*{Preface to the 1994 Edition}
\addcontentsline{toc}{section}{Preface to the 1994 Edition}
\markboth{Preface to the 1994 Edition}{Preface to the 1994 Edition}
\initial I'm honored that the \Forth{} Interest Group is reprinting
......@@ -114,6 +114,7 @@ footskip=.6in,marginparwidth=0.6in,marginparsep=0.1in}}
......@@ -403,6 +404,17 @@ shadowcolor=lightgrey,shadowsize=3pt,blur=true]{\unhbox\@tempboxa}%
% \sffamily
......@@ -450,6 +462,7 @@ Five\or Six\or Seven\or Eight\or Nine\or Ten\fi}
\parskip\z@ \@plus .3\p@\relax
......@@ -590,6 +603,18 @@ samepage=true,xleftmargin=0em,xrightmargin=0em,baselinestretch=0.8}
%% table of contents style
\def\@upperskip{1.5em \@plus\p@}
\def\@lowerskip{1.0em \@plus\p@}
......@@ -687,11 +712,6 @@ samepage=true,xleftmargin=0em,xrightmargin=0em,baselinestretch=0.8}
% no indent after section start
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment