Skip to content
Commits on Source (182)
*.aux
*.dvi
*.log
*.toc
*.out
*.sub
*.cb*
\ No newline at end of file
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Comment the next line if you want to keep your tikz graphics files
*.tikz
*-tikzDictionary
# listings
*.lol
# makeidx
*.idx
*.ilg
*.ind
*.ist
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# easy-todo
*.lod
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices
*.xyc
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# Kile
*.backup
# KBibTeX
*~[0-9]*
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# generated if using elsarticle.cls
*.spl
image: debian:unstable
before_script:
- apt update -qq
- apt-get -y install texlive texlive-pstricks texlive-latex-recommended
texlive-fonts-extra cm-super make
stages:
- build
build-distcheck:
stage: build
script:
- make pdf
- mkdir pdfs
- mv *.pdf pdfs
# The files which are to be made available in GitLab
artifacts:
paths:
- pdfs/*
# Default target simply complains
PDFTEX = pdflatex
TEX = latex
usage:
@echo "Usage: make [ dvi | ps | pdf | clean ]"
# Define a few short-cut targets
dvi: forth.dvi
ps: forth.ps
pdf: forth.pdf
html: forth.html
# Now for the actual detail
one:
$(PDFTEX) forth.tex
forth.wrd: forth.tex *.tex
$(PDFTEX) forth.tex
forth.wds: forth.wrd
perl sort.pl < forth.wrd > forth.wds
forth.dvi: forth.wds
$(TEX) "\scrollmode\input forth.tex"
$(TEX) forth.tex
# Now for the change bars
$(TEX) forth.tex
$(TEX) forth.tex
# Stop make from re-building when the ps target is used
touch forth.wds # update .wds as .wrd has been updated
touch forth.dvi # now we have to update the .dvi
forth.ps: forth.dvi
dvips -K -t A4 forth
forth.pdf: forth.wds
$(PDFTEX) "\scrollmode\input forth.tex"
$(PDFTEX) forth.tex
# Now for the change bars
$(PDFTEX) forth.tex
$(PDFTEX) forth.tex
zip: *.tex clean
(cd ..; zip -9 -r basis.zip basis -x \*CVS\* -x \*.pdf -x \*.zip)
mv ../basis.zip basis-`grep \\revision\} forth.tex | cut -c24-27`-`date +%b-%d`.zip
# This is not currently supported in the latex source,
# but at least we get something usable, one day ...
forth.html: forth.wds
htlatex forth
clean:
# First we clean the LaTeX files
rm -f forth.log # LaTeX Log file
rm -f forth.toc # Table of Contents
rm -f *.aux # Auxiliary files
# The package extension support files
rm -f forth.cb* # Changebar
rm -f forth.out # Hyperref - PDF Bookmarks
# Document's own support files
rm -f *.sub # Auto generated support files
rm -f forth.wrd # Word list (unsorted)
rm -f forth.wds # Word list (sorted)
# htlatex (text4ht) support files
rm -f forth.4ct # ToC postfix
rm -f forth.4tc # ToC prefix
rm -f forth.idv # Fonts extract
rm -f forth.lg # log file
rm -f forth.xref # Cross references
rm -f forth*.tmp
This directory structure contains the source code for the current
forth200x basis document.
Requirements
============
I assume you have a standard latex2e system installed. This includes
the use of the latex, pdflatex, and dvips programs. I also assume
a perl interpreter is installed.
The document uses a number of standard latex packages. These are
part of the standard latex2e installation. If your system does not
have any of these packages they can be obtained from your local CTAN
mirror (www.ctan.org).
a4wide: Setting the paper size correctly
graphicx: Enhanced Graphics
fancyhdr: Fancy headings
changebar: Change Bars
ulem: Underline and struck thorough text
hyperref: Hypertext links
mathptmx: New-Times-Roman for roman and formula, part of PS-NFSS
helvet: Helvetica for sans-serif, part of PS-NFSS
courier: Courier font, also part of PS-NFSS
parskip: Non-zero parskip adjustments
In addition to these packages I also make use of the following
optional packages:
answers: Deferred text - this is provided as a .sty, but the full
package is provided in the Support directory. It is also
available on CTAN.
history: Change Log - I have been developing this package alongside
the document. The version included here is the full code
as it currently exists.
randtext: Randomise text - used to typeset email address in a manner
that automatic harvester program find impossible to process.
environ: Editors Comments Box.
Building the Document
=====================
I have include both a makefile for use with *nix systems and a
make.bat for use with dos/windows systems. Simply cd into the
directory and type make.
There are a number of make targets available:
dvi: This will build a "forth.dvi" file. This is used to produce
the PostScript version of the document.
ps: This will produce a file "forth.ps", a PostScript version of
the document. It uses both latex and dvips to do this.
pdf: This will produce a file "forth.pdf", a PDF version of the
document, complete with internal hyper links.
pdflatex is used to produce this.
clean: Will clean up all the temporary files which get left behind.
The latex process
=================
The main "driver" file is "forth.tex". This will include all the
other files as it needs them. In order to build the final document
you need to run it though latex several times.
Extract auxiliary file
----------------------
The first time it runs, it will generate a lot of auxiliary files,
these contain information needed for the cross referencing system.
It will also generate a set of "labels" and you will see a large
number of warnings of the form:
LaTeX Warning: Reference `search:ONLY' on page 274 undefined
on input line 398.
and
LaTeX Warning: Can't find definition of "TIB" in wordlist
"core", reference on page 2 on input line 128.
These are produced because the labels have not been defined yet, they
are being defined by this run.
Sort the index
--------------
When latex is run on forth.tex it produces a "forth.wrd" file. This
is the list of words defined in the document given in the order they
have been defined. In order to get the alphabetical word list used
as the index we have to sort this list. This is done with the aid
of a small perl script which produces a "forth.wds" file.
As this file uses labels to locate the page of a word definition, we
do not need to wait for the page numbers to settle down.
Correct Labels
--------------
As there are no labels on the first run, place holders are used.
These will not be the same size as the text of the actual label.
Thus having defined the labels, we have to run the file though latex
once again to get the labels correct. As these labels will be of
a different size to the place holders, we have to run latex a third
time to resolve all the page numbers correctly.
Change Bars
-----------
Now that the text has settled down we can work out where to place
the change bars. This uses a similar technique to the labels, in
that it collects the information it requires on one run, and then
uses that information on a second run. Unfortunately, we have just
changed the information on the last run, so we have to run the
whole thing through latex two more times.
Configuration
=============
There are four configuration options which can be found at the top of
the "forth.tex" file.
Page Size
---------
This is currently defined by line:
\usepackage{a4wide}
If you wish to change the paper size you need to remove this line and
add a suitable option to the \documentclass command on the first line.
For example to use US legal the \documentclass command should be:
\documentclass[10pt,legalpaper]{book}
The standard LaTeX paper sizes are available:
a4paper 297mm x 210mm
a5paper 210mm x 148mm
b5paper 250mm x 176mm
letterpaper 11in x 8.5in
legalpaper 14in x 8.5in
executivepaper 10.5in x 7.25in
Text Size
---------
The size of the text can be modified in the normal way, replace the
10pt option in the \documentclass command with a different option.
LaTeX allows three size options:
10pt 11pt 12pt
Labels
------
All words are given a label so they can be referenced, this label
normally has the same name as the word. Unfortunately this is not
always possible. As the label is used as the target for a hyperlink
it can not contain characters which have special meaning in the target
format (PS/PDF or HTML). These labels are not normally shown, a flag
is provided to show these label in the word header block and in the
index. To enable this feature you must comment out the
\showreffalse command and uncomment the \showreftrue line.
Informative text Location
-------------------------
The informative text for a word is given in the word definition.
The \inline flag, controls how these sections are presented:
\inlinetrue
The informative text is given alongside the main defintion.
This is known as the review (r) version of the document.
\inlinefalse
The informative text is shipped out to an external file.
The file is read back in when the approperate appendix
is processed.
Macros
======
As you would expect a number of LaTeX macros are defined to make the
whole thing easier to handle.
Change Markup
-------------
The change markup is provided via the "history" package. All
changes require a label, the label is normally the name of the
proposal associated with the change. All markup is identified
with a change bar in the margin. The <text> is limited to a
single paragraph and must not span a paragraph break.
\place{label}{text}
Place new <text> in the document. The text will appear
underlined.
\replace{label}{old}{new}
Replace the <old> text with the <new> text. The <old> text
will appear struck though, while the <new> text will appear
underlined.
\remove{label}{text}
Remove the <text> from the document. The <text> will appear
struck though.
Word lists
----------
When a word is defined a label is automatically defined for cross
reference. These labels are separated into wordlists. A few
commands have been defined to manage the LaTeX wordlists.
\wordlist{<wordlist>}
Starts the definition of a new <wordlist>. This command
sets up the chapter heading and support files required for
the word definitions.
\setwordlist{<wordlist>}
Sets the current wordlist search order to <wordlist>.
\extended
Switches the word list label on the definition header to add
the "EXT" or extended word set.
Word Definition
---------------
To define a new word the worddef environment is used:
\begin{worddef}[<label>]{<number>}[<sub-number>]{<name>}[<english>][<proposal>]
<label> Is the LaTeX label given to the word. It is used
when processing links, and should not include any PDF
or HTML Special characters. This is the label by
which the word in known to the LaTeX system, and the
name which should be used in the \word{} and \wref{}
commands.
Default: <name> is assumed to be the label.
<number> The word's number in the alphabetical listing of
words. This should be the full four digit number.
If it is empty a long dash is used.
<sub-number> The document requires we add new words between
existing words. I.e., a new word between 0124 and
0125, we can only archive this by further dividing
the number with a two digit sub-number.
Default: No subdivision.
<name> This is the display name of the word. It is typeset
in standard LaTeX. Note the use of additional macros
for special characters (see below).
<english> Is the English pronunciation of the word.
Default: None.
<proposal> The name of the proposal which introduced this word.
All words introduced by Forth 200x should have a
proposal. When a new word is defined an <english>
argument MUST also be defined. This may be empty.
Default: None.
The worddef* environment adds change bars to the output. This is
used to introduce a new word into the standard for the first time.
The following commands are provided to aid the word definition:
\stack[<stack>]{<before>}{<after>}
Type set a stack picture according to the rules below.
\param{<item>} Type set the stack <item> according to the following
rule:
_x or _{xx} x or xx is a subscript.
x*y x multiplied by y.
x|y x or y
<xxx> the argument <xxx>
" the open or close double quote
All other characters are typeset in italic.
The worddef environment MUST begin with one of the following section
headings:
\item No section heading
\compile Compilation time semantics
\execute[<type>] Execution semantics, with a given <type>
\init Initiation
\interpret Interpretation semantics
\note[<number>] Note with an optional <number>
\runtime[<type>] Run-time semantics, with a given <type>
\see Reference to other words (See)
\item[<name>] None standard section "<name>:"
Word Rationale
--------------
The rationale environment should be used to identify text which is
to be included in the rationale for a definition. Only one rationale
section is allowed for each definition.
\begin{rationale}
The \inline flag controls how the text is processed:
\inlinefalse
The text is exported to an external support file
(r-<wordlist>.sub). The text is subsequently
included into the rationale, appendix A.
\inlinetrue
All text typeset in a sans-serif font, but the text
will appear as part of the word definition. This is
used in the review version of the document.
Testing
-------
The testing environment should be used to identify text which is to
be included in the test cases for a defintion. It works in the same
manner as the rationale environment, producing a t-<wordlist>.sub
support file which is read in by the Testing appendix.
A macros has been defined to present a test case:
\test[<format>]{<pre>}{<post>}
Will generate a test case where <pre> is the code under test,
<post> is the expected result, and <format> is the format
of the result. This will produce the following output:
T{ <pre> -> <post> <format>}T
The text is typeset in the teletype font and spaces are *not*
ignored. Additional spaces in the input will appear in the
output. This allow for formatting of a group of test cases.
Reference Implementation
------------------------
The implement environment should be used to identify a reference
implementation for a defintion. It works in the same manner as the
rationale environment, producing an i-<wordlist>.sub support file
which is read in by the Reference Implementation appendix. The
teletype font is used for the text in this envirnment.
\textdf{<text>} Typeset the <text> in the default font, sans-serif
in the review document and times-new-roman in the
final version. <text> may not span more than a
single paragraph.
\dffamily Switch to the default font for the rest of the
environment.
Special Characters
------------------
\tab[n] Insert additional horizontal space.
n is a multiplier so \tab[2] will insert twice as
much space as a single \tab.
\arg{<text>} <text> is typeset in italic between < and > sines.
\bs Outputs the "\" (backslash) character.
\tilde Outputs the "~" (tilde) character.
\num Outputs the "#" (number) character.
\brace Outputs the "{" (open brace) character.
Cross Referencing
-----------------
There are a number of commands which extend the standard cross
reference mechanism. These commands take account of the word list
and the hyperlinking.
The label are automatically defined for us by the worddef and
rationale, testing and implement environments. Normally the word
label will be <wordlist>:<name> however, when <name> contains a
character which may confuse PDF, PS or HTML the word has to be given
a special label in which case this label is used <wordlist>:<label>.
\word[<wordlist>]{<label>} - word definition
Reference the word associated with <label>. The word is
either in the current wordlist (see \wordlist or \setwordlist),
the core wordlist or the optional <wordlist>. The word is
shown in courier-bold and hyperlinked to its definition.
If the \showref flag is true (\showreftrue) the word is
underlined.
If the word has not been defined, or can not be found, a
warning is reported and the <label> is typeset struck
through with a line.
\xref[<text>]{<label>} - Extended cross reference
This was originally developed as a tool to help in the
conversion of existing documents into LaTeX form. It will
look up <label> and places the section number followed by
the section name as a hyperlink to the section.
Should <label> not be found it places <label> (between
brackets) with the optional <text> along side. The idea
being that we can see what was in the original document
(<text>), and which <label> was not found. If the <text> is
not given, the traditional double question mark is used.
Thus for the following example, let the label "foo" refer to
section 3.2.1 which has the title "Extended Xref", the
cross reference:
\xref[original text]{foo}.
would produce:
"3.2.1 Extended Xref"
which is hyperlink to section 3.2.1.
If the label foo is not defined, it would produce:
"[foo: original text]"
where the "[foo: original text]" appears in bold. This is
intended to indicate that the label foo was not found, but
the original document had "original text" as the text which
should appear here.
\wref{<label>}{<Name>} - Word reference
Cross reference to a words definition.
<label> will be of the form <wordlist>:<label>.
<name> is the LaTeX which will be typeset for the word
reference. Both the word number and name are type
set and a hyperlink is provided to the word's
definition.
\rref{<label>}{<name>} - Rationale reference
\rref is the same as \wref except it looks in the rationale
(rat:) name space.
\tref{<label>}{<name>} - Testing reference
\tref is the same as \wref excpet it looks in the testing
(test:) name sapce.
\iref{<label>}{<name>} - Implementation reference
\iref is the same as \wref excpet it looks in the reference
implmentation (imp:) name space.
Utilities
=========
I have been developing the document on a Windows 7 system using the
following utilities:
MiKTeX 2.9 www.miktex.org
TeXworks 0.4.3 www.tug.org/texworks
TextPad 5.4.2 www.textpad.com
Perl 5.14.2 www.ActiveState.com/perl
This diff is collapsed.
%%
%% This file will generate fast loadable files and documentation
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
%%
%% IMPORTANT NOTICE:
%%
%% No other permissions to copy or distribute this file in any form
%% are granted and in particular no permission to modify its contents.
%%
%% --------------- start of docstrip commands ------------------
%%
\def\batchfile{answers.ins}
\input docstrip.tex
\preamble
Copyright (C) 1990,1994 Mike Piff, University of Sheffield, England
You are not allowed to change this file.
You are NOT ALLOWED to distribute this file alone. You are NOT
ALLOWED to take money for the distribution or use of this
file except for a nominal charge for copying etc.
Please address any problems to:
M.Piff@shef.ac.uk
For updates, contact your nearest CTAN site.
\endpreamble
\keepsilent
\def\Ask#1#2{\def#1{y}}
\Msg{*** Generating the package file ***}
\generate{\file{answers.sty}{\from{answers.dtx}{answers}}}
\preamble
\endpreamble
\Msg{*** Generating example files ***}
\generate{%
\file{ansexam1.tex}{\from{answers.dtx}{ex1}}
\file{ansexam2.tex}{\from{answers.dtx}{ex2}}
\file{ansexam3.tex}{\from{answers.dtx}{ex3}}
}
\ifToplevel{%
\Msg{***********************************************************}
\Msg{*}
\Msg{* To finish the installation you have to move the file}
\Msg{* answers.sty into a directory searched by TeX:}
\Msg{* To produce the documentation, run the file answers.dtx through LaTeX.}
\Msg{* To see an example, run the file answexam.tex through LaTeX.}
\Msg{***********************************************************}
}
\endinput
This diff is collapsed.
This diff is collapsed.
%%
%% This is file `environ.ins',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% environ.dtx (with options: `batchfile')
%%
%% __________________________________
%% Copyright (C) 2007 Will Robertson
%%
%% License information appended.
%%
%%
\input docstrip.tex
\keepsilent
\preamble
__________________________________
Copyright (C) 2007 Will Robertson
License information appended.
\endpreamble
\postamble
Copyright (C) 2007 by Will Robertson <wspr81@gmail.com>
Distributable under the LaTeX Project Public License,
version 1.3c or higher (your choice). The latest version of
this license is at: http://www.latex-project.org/lppl.txt
This work is "maintained" (as per LPPL maintenance status)
by Will Robertson.
This work consists of the file environ.dtx
and the derived files environ.pdf,
environ.sty, and
environ.ins.
\endpostamble
\askforoverwritefalse
\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
\endbatchfile
%%
%% Copyright (C) 2007 by Will Robertson <wspr81@gmail.com>
%%
%% Distributable under the LaTeX Project Public License,
%% version 1.3c or higher (your choice). The latest version of
%% this license is at: http://www.latex-project.org/lppl.txt
%%
%% This work is "maintained" (as per LPPL maintenance status)
%% by Will Robertson.
%%
%% This work consists of the file environ.dtx
%% and the derived files environ.pdf,
%% environ.sty, and
%% environ.ins.
%%
%%
%% End of file `environ.ins'.
<?xml version="1.0" encoding="UTF-8"?>
<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"><dia:diagramdata><dia:attribute name="background"><dia:color val="#ffffff"/></dia:attribute><dia:attribute name="paper"><dia:composite type="paper"><dia:attribute name="name"><dia:string>#A4#</dia:string></dia:attribute><dia:attribute name="tmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="bmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="lmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="rmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="is_portrait"><dia:boolean val="true"/></dia:attribute><dia:attribute name="scaling"><dia:real val="1"/></dia:attribute><dia:attribute name="fitto"><dia:boolean val="false"/></dia:attribute></dia:composite></dia:attribute><dia:attribute name="grid"><dia:composite type="grid"><dia:attribute name="width_x"><dia:real val="1"/></dia:attribute><dia:attribute name="width_y"><dia:real val="1"/></dia:attribute><dia:attribute name="visible_x"><dia:int val="1"/></dia:attribute><dia:attribute name="visible_y"><dia:int val="1"/></dia:attribute></dia:composite></dia:attribute><dia:attribute name="guides"><dia:composite type="guides"><dia:attribute name="hguides"/><dia:attribute name="vguides"/></dia:composite></dia:attribute></dia:diagramdata><dia:layer name="Background" visible="true"><dia:object type="Standard - Text" version="0" id="O0"><dia:attribute name="obj_pos"><dia:point val="13,10"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="13,9.26531;14.144,10.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#IF#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="13,10"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O1"><dia:attribute name="obj_pos"><dia:point val="13,20"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="13,19.2653;15.288,20.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#THEN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="13,20"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O2"><dia:attribute name="obj_pos"><dia:point val="27,10"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="27,9.26531;29.86,10.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#BEGIN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="27,10"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O3"><dia:attribute name="obj_pos"><dia:point val="27,15"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="27,14.2653;29.86,15.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#WHILE#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="27,15"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Flowchart - Diamond" version="0" id="O4"><dia:attribute name="obj_pos"><dia:point val="6,9"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="5.95,8.95;10.05,11.1178"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="6,9"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2.06777"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="8,10.2319"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O5"><dia:attribute name="obj_pos"><dia:point val="6,12"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="5.95,11.95;10.05,14.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="6,12"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="8,13.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Flowchart - Diamond" version="0" id="O6"><dia:attribute name="obj_pos"><dia:point val="20,14"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="19.95,13.95;24.05,16.1178"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="20,14"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2.06777"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="22,15.2319"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O7"><dia:attribute name="obj_pos"><dia:point val="20,11"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="19.95,10.95;24.05,13.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="20,11"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="22,12.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Line" version="0" id="O8"><dia:attribute name="obj_pos"><dia:point val="8,8"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,7.95;8.05,9.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,8"/><dia:point val="8,9"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O4" connection="0"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O9"><dia:attribute name="obj_pos"><dia:point val="8,11.0678"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,11.0178;8.05,12.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,11.0678"/><dia:point val="8,12"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O4" connection="8"/><dia:connection handle="1" to="O5" connection="0"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O10"><dia:attribute name="obj_pos"><dia:point val="10,10.0339"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,9.97418;12.05,16.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="10,10.0339"/><dia:point val="11,10"/><dia:point val="12,10"/><dia:point val="12,11"/><dia:point val="12,12"/><dia:point val="12,12"/><dia:point val="12,14"/><dia:point val="12,16"/><dia:point val="8,14"/><dia:point val="8,16"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O4" connection="4"/><dia:connection handle="9" to="O15" connection="0"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O11"><dia:attribute name="obj_pos"><dia:point val="22,13"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="21.95,12.95;22.05,14.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="22,13"/><dia:point val="22,14"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O7" connection="1"/><dia:connection handle="1" to="O6" connection="0"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O12"><dia:attribute name="obj_pos"><dia:point val="22,16.0678"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="21.95,16.0178;22.05,18.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="22,16.0678"/><dia:point val="22,18"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O6" connection="8"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O13"><dia:attribute name="obj_pos"><dia:point val="22,8"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="21.95,7.95;22.05,11.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="22,8"/><dia:point val="22,11"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O7" connection="0"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O14"><dia:attribute name="obj_pos"><dia:point val="22,11"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="17.95,8.95;22.05,20.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="22,11"/><dia:point val="22,9"/><dia:point val="21,9"/><dia:point val="20,9"/><dia:point val="19,9"/><dia:point val="18,9"/><dia:point val="18,11"/><dia:point val="18,13"/><dia:point val="18,16"/><dia:point val="18,18"/><dia:point val="18,20"/><dia:point val="19,20"/><dia:point val="20,20"/><dia:point val="21,20"/><dia:point val="22,20"/><dia:point val="22,19"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O7" connection="0"/><dia:connection handle="15" to="O16" connection="1"/></dia:connections></dia:object><dia:object type="SDL - Task" version="0" id="O15"><dia:attribute name="obj_pos"><dia:point val="6,16"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="5.95,15.95;10.05,18.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="6,16"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="8,17.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O16"><dia:attribute name="obj_pos"><dia:point val="20,17"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="19.95,16.95;24.05,19.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="20,17"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="22,18.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Line" version="0" id="O17"><dia:attribute name="obj_pos"><dia:point val="8,21"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,17.95;8.05,21.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,21"/><dia:point val="8,18"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O15" connection="1"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O18"><dia:attribute name="obj_pos"><dia:point val="8,14"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="3.95,13.95;8.05,20.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="8,14"/><dia:point val="8,16"/><dia:point val="4,14"/><dia:point val="4,16"/><dia:point val="4,18"/><dia:point val="4,16"/><dia:point val="4,18"/><dia:point val="4,20"/><dia:point val="8,18"/><dia:point val="8,20"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O5" connection="1"/></dia:connections></dia:object><dia:object type="Standard - Text" version="0" id="O19"><dia:attribute name="obj_pos"><dia:point val="13,15"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="13,14.2653;15.288,15.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#ELSE#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="13,15"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - BezierLine" version="0" id="O20"><dia:attribute name="obj_pos"><dia:point val="24,15.0339"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="21.95,14.9765;26.05,21.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="24,15.0339"/><dia:point val="26,15"/><dia:point val="26,15"/><dia:point val="26,17"/><dia:point val="26,19"/><dia:point val="26,17"/><dia:point val="26,19"/><dia:point val="26,21"/><dia:point val="22,19"/><dia:point val="22,21"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O6" connection="4"/></dia:connections></dia:object><dia:object type="Standard - Text" version="0" id="O21"><dia:attribute name="obj_pos"><dia:point val="27,20"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="27,19.2653;30.432,20.2653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#REPEAT#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="27,20"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object></dia:layer></dia:diagram>
\annex{Alphabetic list of words} % F (informative annex)}}}
\label{annex:index}
In the following list, the last, four-digit, part of the reference
number establishes a sequence corresponding to the alphabetic ordering
of all standard words. The first two or three parts indicate the word
set and glossary section in which the word is defined.
~\par
\makeatletter
% \indexentry{section}{number}{sub}{name}{wordset}{ext}{proposal}{label}[english]
\newcommand{\indexentry}{
\@starfalse
\@ifnextchar*{\alpha@star}{\alpha@entry}
}
\newcommand{\alpha@star}[1]{
\@startrue
\alpha@entry
}
\newlength{\alpha@length}
\ifshowref
\setlength{\alpha@length}{0.2\textwidth}
\else
\setlength{\alpha@length}{0.3\textwidth}
\fi
\newcommand{\alpha@entry}[9]{%
\def\Prop{#7}
%
% Enable the change bar for * words
%
\if@star\cbstart\fi%
%
% Word Number - Hyper linked to its definition
%
\def\Tmp{#2}%
\makebox[5em][r]{\hyperref{}{#5}{#8}{%
#1.\ifx\Tmp\empty\rule[.8ex]{2em}{.5pt}\else#2\fi}}%
%
% The word sub-number
%
\def\Tmp{#3}% {12}%
\makebox[2em][l]{%
\ifx\Tmp\empty\else\hyperref{}{#5}{#8}{.#3}\fi}
%
% Standard Extension Proposal
%
\ifrelease\else
\def\Tmp{#7}%
\ifx\Tmp\empty\else
\marginpar{\textsf{\tiny #7}}
\fi%
\fi%
%
% Word Label - If we are showing reference
%
\ifshowref
\makebox[6em]{%
\def\Tmpa{#8}%
\def\Tmpb{#4}%
\ifx\Tmpa\Tmpb\else\texttt{\small #8}\fi
}%
\fi%
%
% Word Name - Hyperlinked to its definition
%
\makebox[\alpha@length][l]{%
\hyperref{}{#5}{#8}{\textbf{\texttt{#4}}}
\quad
\dotfill
}%
%
% English Pronunciation (if given)
%
\def\Tmp{#9}%
\ifx\Tmp\empty ~\else ``#9''\fi
\dotfill%
%
% Word list
%
\MakeUppercase{#5}%
\def\Tmp{#6}%
\ifx\Tmp\empty\else ~EXT\fi
%
% Page reference
%
\makebox[3em]{\dotfill\pageref{#5:#8}}%
%
% Disable the change bar
%
\if@star\cbend\fi%
\@starfalse
%
% End of line - \par is need to flush the marginpar
%
\par
}
\makeatother
\begingroup
\parskip=0pt
\IfFileExists{\jobname.wds}{
\input{\jobname.wds}
}{
\IfFileExists{\jobname.wrd}{
\begin{center}
\textbf{Unsorted List}
\end{center}
\input{\jobname.wrd}
}{
File not found !
}
}
\endgroup
%%
%% This is file `answers.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% answers.dtx (with options: `answers')
%%
%% Copyright (C) 1990,1994 Mike Piff, University of Sheffield, England
%%
%% You are not allowed to change this file.
%%
%% You are NOT ALLOWED to distribute this file alone. You are NOT
%% ALLOWED to take money for the distribution or use of this
%% file except for a nominal charge for copying etc.
%%
%% Please address any problems to:
%%
%% M.Piff@shef.ac.uk
%%
%% For updates, contact your nearest CTAN site.
%%
\def\fileversion{2.10}
\def\filedate{16 Dec 1997 17:05:29 BST}
\def\filename{answers.dtx}
\def\Copyright{Copyright (C) 1990,1994 Mike Piff,
University of Sheffield, England}
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesPackage{answers}[1996/07/10]
\typeout{Package `answers' <\filedate>.}
\typeout{\Copyright}
\newif\ifanswerfiles \answerfilestrue
\DeclareOption{nosolutionfiles}{\answerfilesfalse
\typeout{No answer files being produced}}%
\ProcessOptions
\RequirePackage{verbatim}
\newcommand{\solutionpoint}{.}
\newcommand{\solutionextension}{tex}
\newenvironment{Filesave}[1]{%
\@bsphack
\def\verbatim@processline{}%
\Iffileundefined{#1}{}{%
\Ifopen{#1}{%
\def\verbatim@processline{%
\Ifanswerfiles{%
\immediate\write\@nameuse{#1@file}%
{\the\verbatim@line}%
}{}%
}%
}{}%
}%
\let\do\@makeother\dospecials
\catcode`\^^M\active \catcode`\^^I=12\relax
\verbatim@start
}{\@esphack}
\newcommand{\Writetofile}[2]{%
\@bsphack
\Iffileundefined{#1}{}{%
\Ifopen{#1}{%
{%
\let\protect\string
\Ifanswerfiles{%
\immediate\write\@nameuse{#1@file}{#2}%
}{}%
}%
}{}%
}%
\@esphack
}
\newcommand{\Ifopen}[3]{%
\csname if#1open\endcsname#2\else#3\fi}%
\newcommand{\Iffileundefined}[3]{%
\csname ifx\expandafter\endcsname
\csname #1@file\endcsname\relax
#2\else#3\fi}
\newcommand{\Ifanswerfiles}[2]{%
\ifanswerfiles #1\else #2\fi}
\def\Opensolutionfile#1{%
\@ifnextchar[{\define@filename{#1}}%
{\define@filename{#1}[#1]}}%
\def\define@filename#1[#2]{%
\global\@namedef{#1@filename}{#2\solutionpoint\solutionextension}%
\Ifanswerfiles{%
\typeout{Output from handle #1 going
to #2.\solutionextension}%
}{}%
\Iffileundefined{#1}{%
\expandafter\newwrite\csname #1@file\endcsname
\csname newif\expandafter\endcsname
\csname if#1open\endcsname
\global\csname #1openfalse\endcsname
\expandafter\ifx\csname Open#1hook\endcsname\relax
\global\@namedef{Open#1hook}##1{}%
\fi
\expandafter\ifx\csname Close#1hook\endcsname\relax
\global\@namedef{Close#1hook}##1{}%
\fi
}{}%
\let\Tmp\relax
\Ifopen{#1}{\typeout{File #1 already open}}{%
\Ifanswerfiles{%
\immediate\openout\@nameuse{#1@file}=%
\@nameuse{#1@filename}%
}{}%
\global\csname#1opentrue\endcsname
\def\Tmp{\@nameuse{Open#1hook}{#1}}%
}%
\Tmp
}
\def\Closesolutionfile#1{%
\let\Tmp\relax
\Iffileundefined{#1}{}{%
\Ifopen{#1}{%
\Ifanswerfiles{%
\immediate\closeout\@nameuse{#1@file}%
}{}%
\global\csname #1openfalse\endcsname
\def\Tmp{\@nameuse{Close#1hook}{#1}}%
}{}%
}%
\Tmp
}
\def\Readsolutionfile#1{%
\Ifanswerfiles{%
\Iffileundefined{#1}{}{%
\Ifopen{#1}{%
\typeout{WARNING: attempt to read open file #1}%
}{%
\edef\Tmp{%
\noexpand\InputIfFileExists
{\@nameuse{#1@filename}}{}%
{\noexpand\message{File
\@nameuse{#1@filename}%
\space not found}}%
}%
\Tmp
}%
}%
}{}%
}
\newcommand{\Newassociation}[3]{%
\newsolution{#2}%
\expandafter\ifx\csname #3opentrue\endcsname\relax
\expandafter\newif\csname if#3open\endcsname
\fi
\newenvironment{#1}{%
\Ifanswerfiles{%
\let\Tmp\relax
\Iffileundefined{#3}{}{%
\Ifopen{#3}{%
\immediate\write\@nameuse{#3@file}%
{\string\begin{#2}\@nameuse{#2params}}%
\def\Tmp{\Filesave{#3}}%
}{}%
}%
}{%
\edef\Tmp{\noexpand\begin{#2}\@nameuse{#2params}}%
}%
\csname pre#1\endcsname
\Tmp
}%
{%
\Ifanswerfiles{%
\Iffileundefined{#3}{}{%
\Ifopen{#3}{%
\endFilesave%
\immediate\write\@nameuse{#3@file}%
{\string\end{#2}}%
\csname post#1\endcsname
}{}%
}%
}{%
\end{#2}%
}%
}%
}
\newcommand{\newsolution}[1]{%
\@ifundefined{#1}{%
\global\@namedef{#1params}{{\Currentlabel}}%
\newenvironment{#1}[1]%
{%
\csname pre#1\endcsname
\trivlist
\item[\hskip\itemsep{\@nameuse{#1label}{##1}}]}%
{\csname post#1\endcsname\endtrivlist}%
\global\@namedef{#1label}##1{\solutionstyle{##1}}%
}{\typeout{WARNING: environment #1 already in use}}%
}
\newcommand{\solutionstyle}[1]{\textbf{#1}}
\newcommand{\Currentlabel}{\@currentlabel}
\endinput
%%
%% End of file `answers.sty'.
<?xml version="1.0" encoding="UTF-8"?>
<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/"><dia:diagramdata><dia:attribute name="background"><dia:color val="#ffffff"/></dia:attribute><dia:attribute name="paper"><dia:composite type="paper"><dia:attribute name="name"><dia:string>#A4#</dia:string></dia:attribute><dia:attribute name="tmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="bmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="lmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="rmargin"><dia:real val="2.8222"/></dia:attribute><dia:attribute name="is_portrait"><dia:boolean val="true"/></dia:attribute><dia:attribute name="scaling"><dia:real val="1"/></dia:attribute><dia:attribute name="fitto"><dia:boolean val="false"/></dia:attribute></dia:composite></dia:attribute><dia:attribute name="grid"><dia:composite type="grid"><dia:attribute name="width_x"><dia:real val="1"/></dia:attribute><dia:attribute name="width_y"><dia:real val="1"/></dia:attribute><dia:attribute name="visible_x"><dia:int val="1"/></dia:attribute><dia:attribute name="visible_y"><dia:int val="1"/></dia:attribute></dia:composite></dia:attribute><dia:attribute name="guides"><dia:composite type="guides"><dia:attribute name="hguides"/><dia:attribute name="vguides"/></dia:composite></dia:attribute></dia:diagramdata><dia:layer name="Background" visible="true"><dia:object type="Standard - Text" version="0" id="O0"><dia:attribute name="obj_pos"><dia:point val="13,10"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="13,9.21531;14.194,10.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#IF#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="13,10"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O1"><dia:attribute name="obj_pos"><dia:point val="13,16"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="13,15.2153;15.338,16.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#THEN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="13,16"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O2"><dia:attribute name="obj_pos"><dia:point val="24,10"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="24,9.21531;26.91,10.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#BEGIN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="24,10"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O3"><dia:attribute name="obj_pos"><dia:point val="24,15"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="24,14.2153;26.91,15.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#UNTIL#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="24,15"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O4"><dia:attribute name="obj_pos"><dia:point val="36,10"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="36,9.21531;38.91,10.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#BEGIN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="36,10"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Text" version="0" id="O5"><dia:attribute name="obj_pos"><dia:point val="36,16"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="36,15.2153;38.91,16.3653"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>#AGAIN#</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier-Bold"/></dia:attribute><dia:attribute name="height"><dia:real val="1"/></dia:attribute><dia:attribute name="pos"><dia:point val="36,16"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="0"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Flowchart - Diamond" version="0" id="O6"><dia:attribute name="obj_pos"><dia:point val="6,9"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="5.95,8.95;10.05,11.1178"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="6,9"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2.06777"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="8,10.2319"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O7"><dia:attribute name="obj_pos"><dia:point val="6,12"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="5.95,11.95;10.05,14.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="6,12"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="8,13.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Flowchart - Diamond" version="0" id="O8"><dia:attribute name="obj_pos"><dia:point val="19,14"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="18.95,13.95;23.05,16.1178"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="19,14"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2.06777"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="21,15.2319"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O9"><dia:attribute name="obj_pos"><dia:point val="19,11"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="18.95,10.95;23.05,13.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="19,11"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="21,12.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="SDL - Task" version="0" id="O10"><dia:attribute name="obj_pos"><dia:point val="31,12"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="30.95,11.95;35.05,14.05"/></dia:attribute><dia:attribute name="elem_corner"><dia:point val="31,12"/></dia:attribute><dia:attribute name="elem_width"><dia:real val="4"/></dia:attribute><dia:attribute name="elem_height"><dia:real val="2"/></dia:attribute><dia:attribute name="show_background"><dia:boolean val="true"/></dia:attribute><dia:attribute name="flip_horizontal"><dia:boolean val="false"/></dia:attribute><dia:attribute name="flip_vertical"><dia:boolean val="false"/></dia:attribute><dia:attribute name="padding"><dia:real val="0.353553"/></dia:attribute><dia:attribute name="text"><dia:composite type="text"><dia:attribute name="string"><dia:string>##</dia:string></dia:attribute><dia:attribute name="font"><dia:font name="Courier"/></dia:attribute><dia:attribute name="height"><dia:real val="0.8"/></dia:attribute><dia:attribute name="pos"><dia:point val="33,13.198"/></dia:attribute><dia:attribute name="color"><dia:color val="#000000"/></dia:attribute><dia:attribute name="alignment"><dia:enum val="1"/></dia:attribute></dia:composite></dia:attribute></dia:object><dia:object type="Standard - Line" version="0" id="O11"><dia:attribute name="obj_pos"><dia:point val="8,8"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,7.95;8.05,9.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,8"/><dia:point val="8,9"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O6" connection="0"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O12"><dia:attribute name="obj_pos"><dia:point val="8,14"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,13.95;8.05,18.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,14"/><dia:point val="8,18"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O7" connection="1"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O13"><dia:attribute name="obj_pos"><dia:point val="8,11.0678"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,11.0178;8.05,12.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="8,11.0678"/><dia:point val="8,12"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O6" connection="8"/><dia:connection handle="1" to="O7" connection="0"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O14"><dia:attribute name="obj_pos"><dia:point val="10,10.0339"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="7.95,9.97418;12.05,17.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="10,10.0339"/><dia:point val="11,10"/><dia:point val="12,10"/><dia:point val="12,11"/><dia:point val="12,12"/><dia:point val="12,13"/><dia:point val="12,15"/><dia:point val="12,17"/><dia:point val="8,15"/><dia:point val="8,17"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O6" connection="4"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O15"><dia:attribute name="obj_pos"><dia:point val="21,13"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="20.95,12.95;21.05,14.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="21,13"/><dia:point val="21,14"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O9" connection="1"/><dia:connection handle="1" to="O8" connection="0"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O16"><dia:attribute name="obj_pos"><dia:point val="21,16.0678"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="20.95,16.0178;21.05,18.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="21,16.0678"/><dia:point val="21,18"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="0" to="O8" connection="8"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O17"><dia:attribute name="obj_pos"><dia:point val="21,8"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="20.95,7.95;21.05,11.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="21,8"/><dia:point val="21,11"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O9" connection="0"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O18"><dia:attribute name="obj_pos"><dia:point val="21,11"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="16.95,8.95;21.05,15.0855"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="21,11"/><dia:point val="21,9"/><dia:point val="20,9"/><dia:point val="19,9"/><dia:point val="18,9"/><dia:point val="17,9"/><dia:point val="17,11"/><dia:point val="17,13"/><dia:point val="17,11"/><dia:point val="17,13"/><dia:point val="17,15"/><dia:point val="18,15"/><dia:point val="19,15.0339"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O9" connection="0"/><dia:connection handle="12" to="O8" connection="12"/></dia:connections></dia:object><dia:object type="Standard - Line" version="0" id="O19"><dia:attribute name="obj_pos"><dia:point val="33,8"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="32.95,7.95;33.05,12.05"/></dia:attribute><dia:attribute name="conn_endpoints"><dia:point val="33,8"/><dia:point val="33,12"/></dia:attribute><dia:attribute name="numcp"><dia:int val="1"/></dia:attribute><dia:connections><dia:connection handle="1" to="O10" connection="0"/></dia:connections></dia:object><dia:object type="Standard - BezierLine" version="0" id="O20"><dia:attribute name="obj_pos"><dia:point val="33,12"/></dia:attribute><dia:attribute name="obj_bb"><dia:rectangle val="28.95,9.95;33.05,16.05"/></dia:attribute><dia:attribute name="bez_points"><dia:point val="33,12"/><dia:point val="33,10"/><dia:point val="32,10"/><dia:point val="31,10"/><dia:point val="30,10"/><dia:point val="29,10"/><dia:point val="29,12"/><dia:point val="29,14"/><dia:point val="29,12"/><dia:point val="29,14"/><dia:point val="29,16"/><dia:point val="30,16"/><dia:point val="31,16"/><dia:point val="32,16"/><dia:point val="33,16"/><dia:point val="33,14"/></dia:attribute><dia:attribute name="corner_types"><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/><dia:enum val="0"/></dia:attribute><dia:connections><dia:connection handle="0" to="O10" connection="0"/><dia:connection handle="15" to="O10" connection="1"/></dia:connections></dia:object></dia:layer></dia:diagram>
\annex{Bibliography} % B
\label{annex:bib}
\begin{description}
\item[Industry standards]~
\emph{Forth-77 Standard}, Forth Users Group, FST-780314. \\
\emph{Forth-78 Standard}, Forth International Standards Team. \\
\emph{Forth-79 Standard}, Forth Standards Team. \\
\emph{Forth-83 Standard} and Appendices, Forth Standards Team.
The standards referenced in this section were developed by the
Forth Standards Team, a volunteer group which included both
implementors and users. This was a volunteer organization operating
under its own charter and without any formal ties to ANSI, IEEE or
any similar standards body.
The following standards where developed under the auspices of
ANSI. The committee drawing up the ANSI standard included
several members of the Forth Standards Team.
\emph{ANSI X3.215-1994 Information Systems --- Programming Language FORTH} \\
\emph{ISO/IEC 15145:1997 Information technology. Programming languages. FORTH} \\
\item[Books]~
\begin{description}
\item Brodie, L.
\emph{Thinking FORTH}.
Englewood Cliffs, NJ: Prentice Hall, 1984.
Now available from \url{http://thinking-forth.sourceforge.net/}
\item Brodie, L.
\emph{Starting FORTH} ($2^{\textrm{\scriptsize nd}}$ edition).
Englewood Cliffs, NJ: Prentice Hall, 1987.
\item Feierbach, G. and Thomas, P.
\emph{Forth Tools \& Applications}.
Reston, VA: Reston Computer Books, 1985.
\item Haydon, Dr. Glen B.
\emph{All About FORTH} ($3^{\textrm{\scriptsize rd}}$ edition).
La Honda, CA: 1990.
\item Kelly, Mahlon G. and Spies, N.
\emph{FORTH: A Text and Reference}.
Englewood Cliffs, NJ: Prentice Hall, 1986.
\item Knecht, K.
\emph{Introduction to Forth}.
Indiana: Howard Sams \& Co., 1982.
\item Koopman, P.
\emph{Stack Computers, The New Wave}.
Chichester, West Sussex, England: Ellis Horwood Ltd. 1989.
\item Martin, Thea, editor.
\emph{A Bibliography of Forth References} ($3^{\textrm{\scriptsize rd}}$ edition).
Rochester, New York: Institute of Applied Forth Research, 1987.
\item McCabe, C. K.
\emph{Forth Fundamentals} (2 volumes).
Oregon: Dilithium Press, 1983.
\item Ouverson, Marlin, editor.
\emph{Dr. Dobbs Toolbook of Forth}.
Redwood City, CA: M\&T Press, Vol. 1, 1986; Vol. 2, 1987.
\item Pelc, Stephen.
\emph{Programming Forth}.
Southampton, England: MicroProcessor Engineering Limited, 2005.
\url{http://www.mpeforth.com/arena/ProgramForth.pdf}.
\item Pountain, R.
\emph{Object Oriented Forth}.
London, England: Academic Press, 1987.
\item Rather, Elizabeth D.
\emph{Forth Application Techniques}.
FORTH, Inc., 2006.
ISBN: 978-0966215618.
\item Rather, Elizabeth D. and Conklin, Edward K.
\emph{Forth Programmer's Handbook} ($3^{\textrm{\scriptsize rd}}$ edition).
\linebreak BookSurge Publishing, 2007.
ISBN: 978-1419675492.
\item Terry, J. D.
\emph{Library of Forth Routines and Utilities}.
New York: Shadow Lawn Press, 1986.
\item Tracy, M. and Anderson, A.
\emph{Mastering FORTH} (revised edition).
New York: Brady Books, 1989.
\item Winfield, A.
\emph{The Complete Forth}.
New York: Wiley Books, 1983.
\end{description}
\item[Journals, magazines and newsletters]~
\begin{description}
\item Forsley, Lawrence P., Conference Chairman.
\emph{Rochester Forth Conference Proceedings}.
Rochester, New York: Institute of Applied Forth Research, 1981 to present.
\item Forsley, Lawrence P., Editor-in-Chief.
\emph{The Journal of Forth Application and Research}.
Rochester, New York: Institute of Applied Forth Research, 1983 to present.
\item Frenger, Paul, editor.
\emph{SIGForth Newsletter}.
New York, NY: Association for Computing Machinery, 1989 to present.
\item Ouverson, Marlin, editor.
\emph{Forth Dimensions}.
San Jose, CA: The Forth Interest Group, 1978 to present.
\item Reiling, Robert, editor.
\emph{FORML Conference Proceedings}.
San Jose, CA: The Forth Interest Group, 1980 to present.
\item Ting, Dr. C. H., editor.
\emph{More on Forth Engines}.
San Mateo, CA: Offete Enterprises, 1986 to present.
\end{description}
\item[Selected articles]~
\begin{description}
\item Hayes, J.R.
``Postpone''
\emph{Proceedings of the 1989 Rochester Forth Conference}.
Rochester, New York: Institute for Applied Forth Research, 1989.
\item Kelly, Guy M.
``Forth''.
\emph{McGraw-Hill Personal Computer Programming Encyclopedia
--- Lan\-guages and Operation Systems}.
New York: McGraw-Hill, 1985.
\item Kogge, P. M.
``An Architectural Trail to Threaded Code Systems''.
\emph{IEEE Computer} (March, 1982).
\item Moore, C. H.
``The Evolution of FORTH --- An Unusual Language''.
\emph{Byte} (August 1980).
\item Rather, E. D.
``Forth Programming Language''.
\emph{Encyclopedia of Physical Science \& Technology} (Vol. 5).
New York: Academic Press, 1987.
\item Rather, E. D.
``FORTH''.
\emph{Computer Programming Management}.
Auerbach Publishers, Inc., 1985.
\item Rather, E. D.; Colburn, D. R.; Moore, C. H.
``The Evolution of Forth''.
\emph{ACM SIGPLAN Notices} (Vol. 28, No. 3, March 1993).
\end{description}
\end{description}
% !TeX root = forth.tex
\chapter{The optional Block word set} % 7
\wordlist{block}
\section{Introduction} % 7.1
\section{Additional terms} % 7.2
\begin{description}
\item[block:]
1024 characters of data on mass storage,
designated by a block number.
\item[block buffer:]
A block-sized region of data space where a block is made
temporarily available for use. The current block buffer
is the block buffer most recently accessed by
\word{BLOCK}, \word{BUFFER}, \word{LOAD}, \word{LIST}, or
\word{THRU}.
\end{description}
\section{Additional usage requirements} % 7.3
\subsection{Data space} % 7.3.2
A program may access memory within a valid block buffer.
See: \xref[3.3.3 Data Space]{usage:dataspace}.
\subsection{Block buffer regions} % 7.3.3
\label{block:buffers}
The address of a block buffer returned by \word{BLOCK} or
\word{BUFFER} is transient. A call to \word{BLOCK} or \word{BUFFER}
may render a previously-obtained block-buffer address invalid, as
may a call to any word that:
\begin{itemize}
\item parses:
\item displays characters on the user output device, such as
\word[core]{TYPE} or \word[core]{EMIT};
\item controls the user output device, such as \word[core]{CR} or
\word[facility]{AT-XY};
\item receives or tests for the presence of characters from the
user input device such as \word[core]{ACCEPT} or
\word[core]{KEY};
\item waits for a condition or event, such as \word[facility]{MS}
or \word[facility]{EKEY};
\item manages the block buffers, such as \word{FLUSH},
\word{SAVE-BUFFERS}, or \word{EMPTY-BUFFERS};
\item performs any operation on a file or file-name directory
that implies I/O, such as \word{REFILL} or any word that
returns an \emph{ior};
\item implicitly performs I/O, such as text interpreter nesting
and un-nesting when files are being used (including un-nesting
implied by \word[exception]{THROW}).
\end{itemize}
If the input source is a block, these restrictions also apply to
the address returned by \word[core]{SOURCE}. Block buffers are
uniquely assigned to blocks.
See \xref{rat:block:buffers}.
\subsection{Parsing} % 7.3.4
The Block word set implements an alternative input source for the
text interpreter. When the input source is a block, \word{BLK} shall
contain the non-zero block number and the input buffer is the
1024-character buffer containing that block.
A block is conventionally displayed as 16 lines of 64 characters.
A program may switch the input source to a block by using
\word{LOAD} or \word{THRU}. Input sources may be nested using
\word{LOAD} and \word{EVALUATE} in any order.
A program may reposition the parse area within a block by
manipulating \word[core]{toIN}. More extensive repositioning can be
accomplished using \word[core]{SAVE-INPUT} and
\word[core]{RESTORE-INPUT}.
See: \xref[3.4.1 Parsing]{usage:parsing}.
\subsection{Possible action on an ambiguous condition} % 7.3.5
See: \xref[3.4.4 Possible action on an ambiguous condition]{usage:ambiguous}.
\begin{itemize}
\item A system with the Block word set may set interpretation state
and interpret a block.
\end{itemize}
\section{Additional documentation requirements} % 7.4
\subsection{System documentation} % 7.4.1
\subsubsection{Implementation-defined options} % 7.4.1.1
\begin{itemize}
\item the format used for display by \wref{block:LIST}{LIST}
(if implemented);
\item the length of a line affected by \wref{block:bs}{\bs}
(if implemented).
\end{itemize}
\subsubsection{Ambiguous conditions} % 7.4.1.2
\begin{itemize}
\item Correct block read was not possible;
\item I/O exception in block transfer;
\item Invalid block number (\wref{block:BLOCK}{BLOCK},
\wref{block:BUFFER}{BUFFER}, \wref{block:LOAD}{LOAD});
\item A program directly alters the contents of
\wref{block:BLK}{BLK};
\item No current block buffer for \wref{block:UPDATE}{UPDATE}.
\end{itemize}
\subsubsection{Other system documentation} % 7.4.1.3
\begin{itemize}
\item any restrictions a multiprogramming system places on the use
of buffer addresses;
\item the number of blocks available for source text and data.
\end{itemize}
\subsection{Program documentation} % 7.4.2
\begin{itemize}
\item the number of blocks required by the program.
\end{itemize}
\section{Compliance and labeling} % 7.5
\subsection{Forth-\snapshot{} systems} % 7.5.1
The phrase ``Providing the Block word set'' shall be appended to
the label of any Standard System that provides all of the Block
word set.
The phrase ``Providing \emph{name(s)} from the Block Extensions
word set'' shall be appended to the label of any Standard System
that provides portions of the Block Extensions word set.
The phrase ``Providing the Block Extensions word set'' shall be
appended to the label of any Standard System that provides all of
the Block and Block Extensions word sets.
\subsection{Forth-\snapshot{} programs} % 7.5.2
The phrase ``Requiring the Block word set'' shall be appended to
the label of Standard Programs that require the system to provide
the Block word set.
The phrase ``Requiring \emph{name(s)} from the Block Extensions
word set'' shall be appended to the label of Standard Programs
that require the system to provide portions of the Block Extensions
word set.
The phrase ``Requiring the Block Extensions word set'' shall be
appended to the label of Standard Programs that require the system
to provide all of the Block and Block Extensions word sets.
\section{Glossary} % 7.6
\subsection{Block words} % 7.6.1
\begin{worddef}{0790}{BLK}[b-l-k]
\item \stack{}{a-addr}
\param{a-addr} is the address of a cell containing zero or the
number of the mass-storage block being interpreted. If
\word{BLK} contains zero, the input source is not a block and
can be identified by \word[core]{SOURCE-ID}, if
\word[core]{SOURCE-ID} is available. An ambiguous condition
exists if a program directly alters the contents of \word{BLK}.
\see \xref[7.3.3 Block buffer regions]{block:buffers}.
\end{worddef}
\begin{worddef}{0800}{BLOCK}
\item \stack{u}{a-addr}
\param{a-addr} is the address of the first character of the
block buffer assigned to mass-storage block \param{u}. An
ambiguous condition exists if \param{u} is not an available
block number.
If block \param{u} is already in a block buffer, \param{a-addr}
is the address of that block buffer.
If block \param{u} is not already in memory and there is an
unassigned block buffer, transfer block \param{u} from mass
storage to an unassigned block buffer. \param{a-addr} is the
address of that block buffer.
If block \param{u} is not already in memory and there are no
unassigned block buffers, unassign a block buffer. If the block
in that buffer has been \word{UPDATE}d, transfer the block to
mass storage and transfer block \param{u} from mass storage into
that buffer. \param{a-addr} is the address of that block buffer.
At the conclusion of the operation, the block buffer pointed to
by \param{a-addr} is the current block buffer and is assigned to
\param{u}.
\end{worddef}
\begin{worddef}{0820}{BUFFER}
\item \stack{u}{a-addr}
\param{a-addr} is the address of the first character of the
block buffer assigned to block \param{u}. The contents of the
block are unspecified. An ambiguous condition exists if \param{u}
is not an available block number.
If block \param{u} is already in a block buffer, \param{a-addr}
is the address of that block buffer.
If block \param{u} is not already in memory and there is an
unassigned buffer, \param{a-addr} is the address of that block
buffer.
If block \param{u} is not already in memory and there are no
unassigned block buffers, unassign a block buffer. If the block
in that buffer has been \word{UPDATE}d, transfer the block to
mass storage. \param{a-addr} is the address of that block buffer.
At the conclusion of the operation, the block buffer pointed to
by \param{a-addr} is the current block buffer and is assigned to
\param{u}.
\see \wref{block:BLOCK}{BLOCK}.
\end{worddef}
\begin{worddef}{1360}{EVALUATE}
\item Extend the semantics of \wref{core:EVALUATE}{EVALUATE} to
include: Store zero in \word{BLK}.
\end{worddef}
\begin{worddef}{1559}{FLUSH}
\item \stack{}{}
Perform the function of \word{SAVE-BUFFERS}, then unassign all
block buffers.
\end{worddef}
\begin{worddef}{1790}{LOAD}
\item \stack{i*x u}{j*x}
Save the current input-source specification. Store \param{u} in
\word{BLK} (thus making block \param{u} the input source and
setting the input buffer to encompass its contents), set
\word[core]{toIN} to zero, and interpret. When the parse area is
exhausted, restore the prior input source specification. Other
stack effects are due to the words \word{LOAD}ed.
An ambiguous condition exists if \param{u} is zero or is not a
valid block number.
\see \xref[3.4 The Forth text interpreter]{usage:command}.
\end{worddef}
\newpage
\begin{worddef}{2180}{SAVE-BUFFERS}
\item \stack{}{}
Transfer the contents of each \word{UPDATE}d block buffer to
mass storage. Mark all buffers as unmodified.
\end{worddef}
\begin{worddef}{2400}{UPDATE}
\item \stack{}{}
Mark the current block buffer as modified. An ambiguous
condition exists if there is no current block buffer.
\word{UPDATE} does not immediately cause I/O.
\see \wref{block:BLOCK}{BLOCK},
\wref{block:BUFFER}{BUFFER},
\wref{block:FLUSH}{FLUSH},\\
\wref{block:SAVE-BUFFERS}{SAVE-BUFFERS}.
\end{worddef}
\subsection{Block extension words} % 7.6.2
\extended
\begin{worddef}{1330}{EMPTY-BUFFERS}
\item \stack{}{}
Unassign all block buffers. Do not transfer the contents of
any \word{UPDATE}d block buffer to mass storage.
\see \wref{block:BLOCK}{BLOCK}.
\end{worddef}
\begin{worddef}{1770}{LIST}
\item \stack{u}{}
Display block \param{u} in an implementation-defined format.
Store \param{u} in \word{SCR}.
\see \wref{block:BLOCK}{BLOCK}.
\end{worddef}
\begin{worddef}{2125}{REFILL}
\item \stack{}{flag}
Extend the execution semantics of \wref{core:REFILL}{REFILL}
with the following:
When the input source is a block, make the next block the input
source and current input buffer by adding one to the value of
\word{BLK} and setting \word[core]{toIN} to zero. Return
\emph{true} if the new value of BLK is a valid block number,
otherwise \emph{false}.
\see \wref{core:REFILL}{REFILL},
\wref{file:REFILL}{REFILL}.
\end{worddef}
\begin{worddef}{2190}{SCR}[s-c-r]
\item \stack{}{a-addr}
\param{a-addr} is the address of a cell containing the block
number of the block most recently \word{LIST}ed.
\see \rref{block:SCR}{}.
\begin{rationale} % A.7.6.2.2190 SCR
\word{SCR} is short for screen.
\end{rationale}
\end{worddef}
\begin{worddef}{2280}{THRU}
\item \stack{i*x u_1 u_2}{j*x}
\word{LOAD} the mass storage blocks numbered \param{u_1} through
\param{u_2} in sequence. Other stack effects are due to the words
\word{LOAD}ed.
\end{worddef}
\begin{worddef}[bs]{2535}{\bs}[backslash]
\item Extend the semantics of \wref{core:bs}{\bs} to be:
\compile
Perform the execution semantics given below.
\execute
\stack{"ccc<eol>"}{}
If \word{BLK} contains zero, parse and discard the remainder
of the parse area; otherwise parse and discard the portion
of the parse area corresponding to the remainder of the current
line. \word{bs} is an immediate word.
\end{worddef}
This diff is collapsed.
% !TeX root = forth.tex
% !TeX spellcheck = en_US
% ========== Document Configuration ==========
%\inlinetrue % Inline Rationale/Implementation/Testing with glossary entry
\inlinefalse % Rationale/Implementation/Testing deferred to appropriate annex
%\showreftrue % Display Cross Reference labels (PDF/HTML targets)
\showreffalse % Hide labels
%\releasefalse % Draft document (with change markup)
\releasetrue % Release Candidate document (without markup)
\newcommand{\revision}{14.5} % Document Revision
\newcommand{\snapshot}{2012} % Year of Snapshot
\newcommand{\release}{} % Release Candidate
% ========== End Configuration ==========
\ No newline at end of file