| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" |
| 2 |
"http://www.w3.org/TR/REC-html40/loose.dtd"> |
| 3 |
|
| 4 |
<HTML> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
<HEAD> |
| 31 |
<TITLE>2.5 Document Structuring</TITLE> |
| 32 |
<STYLE TYPE="text/css"> <!-- A {text-decoration: none} // --> </STYLE> |
| 33 |
</HEAD> |
| 34 |
<BODY BACKGROUND="binary/background.gif" |
| 35 |
BGCOLOR="#FFFFFF" |
| 36 |
TEXT="#000000" |
| 37 |
VLINK="#660000" |
| 38 |
LINK="#FF0000" |
| 39 |
ALINK="#CC0000"> |
| 40 |
|
| 41 |
<TABLE WIDTH="490"> |
| 42 |
<TR> |
| 43 |
<TD WIDTH="130" VALIGN="top"> |
| 44 |
<IMG SRC="binary/d_clear.gif" ALT="" WIDTH="130" HEIGHT="1"><BR> |
| 45 |
|
| 46 |
<FONT SIZE="2"> |
| 47 |
<BR> |
| 48 |
|
| 49 |
<A HREF="http://www.ross.net/" |
| 50 |
TARGET="rosshome" |
| 51 |
onClick="window.open('','rosshome','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 52 |
> |
| 53 |
<IMG SRC="binary/rossnet_logo.gif" |
| 54 |
WIDTH="64" HEIGHT="32" |
| 55 |
BORDER="0" ALT="RossNet" |
| 56 |
HSPACE="0" VSPACE="1"></A><BR> |
| 57 |
<BR> |
| 58 |
|
| 59 |
<A HREF="../index.shtml" |
| 60 |
TARGET="funnelweb" |
| 61 |
onClick="window.open('','funnelweb','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 62 |
> |
| 63 |
<IMG SRC="binary/linklogo.gif" |
| 64 |
WIDTH="64" HEIGHT="32" |
| 65 |
BORDER="0" ALT="FunnelWeb" |
| 66 |
HSPACE="0" VSPACE="1"></A><BR> |
| 67 |
<BR> |
| 68 |
<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD BGCOLOR="#000000"> |
| 69 |
<A HREF="../reference/index.html" |
| 70 |
TARGET="funnelwebreference" |
| 71 |
onClick="window.open('','funnelwebreference','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 72 |
><FONT COLOR="#FFFFFF"><B>Reference</B></FONT></A><BR> |
| 73 |
<BR> |
| 74 |
<A HREF="../tutorial/index.html" |
| 75 |
TARGET="funnelwebtutorial" |
| 76 |
onClick="window.open('','funnelwebtutorial','location,status,menubar,scrollbars,resizable',false).focus(); return true;" |
| 77 |
><FONT COLOR="#FFFFFF"><B>Tutorial</B></FONT></A><BR> |
| 78 |
<BR> |
| 79 |
<A HREF="index.html"><FONT COLOR="#FFFFFF"><B>Developer</B></FONT></A><BR> |
| 80 |
<A HREF="compile.html"><FONT COLOR="#FFFFFF">1 Compile</FONT></A><BR> |
| 81 |
<A HREF="design.html"><FONT COLOR="#FFFFFF">2 Design</FONT></A><BR> |
| 82 |
<A HREF="implement.html"><FONT COLOR="#FFFFFF">3 Implement</FONT></A><BR> |
| 83 |
<A HREF="modify.html"><FONT COLOR="#FFFFFF">4 Modify</FONT></A><BR> |
| 84 |
<A HREF="misc.html"><FONT COLOR="#FFFFFF">5 Misc</FONT></A><BR> |
| 85 |
<A HREF="gpl.html"><FONT COLOR="#FFFFFF">6 Licence</FONT></A><BR> |
| 86 |
|
| 87 |
<BR> |
| 88 |
<A HREF="search.html"><FONT COLOR="#FFFFFF"><B>SEARCH</B></FONT></A><BR> |
| 89 |
</FONT> |
| 90 |
</TD></TR></TABLE> |
| 91 |
|
| 92 |
|
| 93 |
</TD> |
| 94 |
<TD WIDTH="360" VALIGN="top"> |
| 95 |
<FONT SIZE="3"> |
| 96 |
|
| 97 |
|
| 98 |
<A HREF="index.html"><IMG SRC="binary/title.gif" |
| 99 |
WIDTH="316" HEIGHT="24" |
| 100 |
BORDER="0" ALT="FunnelWeb Developer Manual" |
| 101 |
HSPACE="0" VSPACE="0"></A> |
| 102 |
<P><FONT SIZE="5">2.5 Document Structuring</FONT><BR> |
| 103 |
|
| 104 |
|
| 105 |
<P>Knuth's WEB system provided just two levels of headings, |
| 106 |
and this scheme was used in FunnelWeb V1. However, experience |
| 107 |
showed that there was a need for more levels. Here are some |
| 108 |
syntaxes that were considered for implementing this: |
| 109 |
|
| 110 |
<P><PRE> |
| 111 |
@*@<Main Program@> |
| 112 |
@**@<Read the Message@> |
| 113 |
@***@<Encrypt the Buffer@> |
| 114 |
|
| 115 |
@*@<Main Program@> |
| 116 |
@*@*@<Read the Message@> |
| 117 |
@*@*@*@<Encrypt the Buffer@> |
| 118 |
|
| 119 |
@s@<Main Program@> |
| 120 |
@ss@<Read the Message@> |
| 121 |
@sss@<Encrypt the Buffer@> |
| 122 |
|
| 123 |
@s@<Main Program@> |
| 124 |
@s@s@<Read the Message@> |
| 125 |
@s@s@s@<Encrypt the Buffer@> |
| 126 |
|
| 127 |
@S@<Main Program@> |
| 128 |
@SS@<Read the Message@> |
| 129 |
@SSS@<Encrypt the Buffer@> |
| 130 |
|
| 131 |
@S@<Main Program@> |
| 132 |
@S@S@<Read the Message@> |
| 133 |
@S@S@S@<Encrypt the Buffer@> |
| 134 |
|
| 135 |
@1@<Main Program@> |
| 136 |
@2@<Read the Message@> |
| 137 |
@3@<Encrypt the Buffer@> |
| 138 |
(using @A..@I@ as macro |
| 139 |
parameters or overload @1..@9) |
| 140 |
|
| 141 |
@*@1@<Main Program@> |
| 142 |
@*@2@<Read the Message@> |
| 143 |
@*@3@<Encrypt the Buffer@> |
| 144 |
(using @A..@I@ as macro parameters |
| 145 |
or overload @1..@9) |
| 146 |
|
| 147 |
@A Main Program |
| 148 |
@B Read the Message |
| 149 |
@C Encrypt the Buffer |
| 150 |
|
| 151 |
@*A Main Program |
| 152 |
@*B Read the Message |
| 153 |
@*C Encrypt the Buffer |
| 154 |
|
| 155 |
The following is the syntax finally chosen. |
| 156 |
@A@<Main Program@> |
| 157 |
@B@<Read the Message@> |
| 158 |
@C@<Encrypt the Buffer@> |
| 159 |
</PRE> |
| 160 |
|
| 161 |
<P>Choosing between these alternatives was not easy. The |
| 162 |
following thoughts contributed to the decision. |
| 163 |
|
| 164 |
<P> |
| 165 |
<UL> |
| 166 |
|
| 167 |
<LI> Syntaxes that require visual counting are probably |
| 168 |
not a good idea. |
| 169 |
|
| 170 |
<LI> Syntaxes that do not delimit the heading name |
| 171 |
somehow are likely to cause problems where heading names are |
| 172 |
omitted. Users will be tempted to start paragraphs after the |
| 173 |
start of heading symbol, and the result is that the first |
| 174 |
line of the paragraph will be sucked into the heading. |
| 175 |
|
| 176 |
<LI> Overloading the <SAMP>@1</SAMP>, ..., |
| 177 |
<SAMP>@9</SAMP> sequences is undesirable. |
| 178 |
|
| 179 |
</UL> |
| 180 |
|
| 181 |
<P>For these reasons, the following syntax was chosen: |
| 182 |
|
| 183 |
<P> |
| 184 |
<PRE> |
| 185 |
@A@<Main Program@> |
| 186 |
@B@<Read the Message@> |
| 187 |
@C@<Encrypt the Buffer@> |
| 188 |
@D@<Encrypt the Buffer@> |
| 189 |
@E@<Encrypt the Buffer@> |
| 190 |
</PRE> |
| 191 |
|
| 192 |
<P>A maximum of five levels was chosen because it's |
| 193 |
probably sufficient, and <SAMP>@F</SAMP> should be reserved |
| 194 |
for <STRONG>F</STRONG>ile. |
| 195 |
|
| 196 |
|
| 197 |
<P> |
| 198 |
<TABLE WIDTH="100%"> |
| 199 |
<TR> |
| 200 |
<TD ALIGN="left" VALIGN="bottom"><A HREF="design_syntax.html"><IMG SRC="binary/fw_left.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Prev"></A></TD> |
| 201 |
<TD ALIGN="center" VALIGN="bottom"><A HREF="design.html"><IMG SRC="binary/fw_up.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Up"></A></TD> |
| 202 |
<TD ALIGN="right" VALIGN="bottom"><A HREF="design_testing.html"><IMG SRC="binary/fw_right.gif" HEIGHT="32" WIDTH="32" BORDER="0" ALT="Next"></A></TD> |
| 203 |
</TR> |
| 204 |
</TABLE> |
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
<P> |
| 209 |
<HR> |
| 210 |
<FONT SIZE="2"> |
| 211 |
<A HREF="mailto:[email protected]">Webmaster</A> |
| 212 |
<A HREF="copyright.html">Copyright © Ross N. Williams 1992,1999. All rights reserved.</A><BR> |
| 213 |
</FONT> |
| 214 |
|
| 215 |
</FONT> |
| 216 |
</TD> |
| 217 |
</TR> |
| 218 |
</TABLE> |
| 219 |
|
| 220 |
|
| 221 |
</BODY> |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
</HTML> |