/usr/share/doc/fweb/html-info/Tips.html is in fweb-doc 1.62-13.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>FWEB: Tips</title>
<meta name="description" content="FWEB: Tips">
<meta name="keywords" content="FWEB: Tips">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-index.html#Concept-index" rel="index" title="Concept index">
<link href="Parameter-index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Hints.html#Hints" rel="up" title="Hints">
<link href="Science.html#Science" rel="next" title="Science">
<link href="Converting.html#Converting" rel="prev" title="Converting">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<a name="Tips"></a>
<div class="header">
<p>
Next: <a href="Science.html#Science" accesskey="n" rel="next">Science</a>, Previous: <a href="Converting.html#Converting" accesskey="p" rel="prev">Converting</a>, Up: <a href="Hints.html#Hints" accesskey="u" rel="up">Hints</a> [<a href="Parameter-index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-index.html#Concept-index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="index-Suggestions"></a>
<a name="index-Programming-tips"></a>
<a name="Programming-tips-and-other-suggestions"></a>
<h3 class="section">13.2 Programming tips and other suggestions</h3>
<ol>
<li> Learn how to use the GNU <code>info</code> browser to access the on-line
documentation.
</li><li> Read the list of new features and changes for the last several
releases. See <a href="New-features.html#New-features">New features</a>.
</li><li> Periodically check <code>ftp.pppl.gov:/pub/fweb/READ_ME</code> for bug
reports and other news. Make bug reports! See <a href="Support.html#Support">Support</a>.
</li><li> If you have a color terminal, try the option ‘<samp>-C1</samp>’ (see <a href="_002dC_005f.html#g_t_002dC_005f">-C_</a>,
see <a href="Color.html#Color">Color</a>).
</li><li> Any option in <samp>.fweb</samp> that is intended to be processed <em>after</em>
the command-line options should begin with ‘<samp>&</samp>’ rather than
‘<samp>-</samp>’. (This is rarely necessary.)
See <a href="Initialization.html#Initialization">Initialization</a>
</li><li> Put standard command-line options into <samp>.fweb</samp>. Also put there
standard style parameters—e.g.,
<div class="example">
<pre class="example">-pindex.tex "#.ndx"
-pmodules.tex "#.mds"
-pcontents.tex "#.cts"
</pre></div>
</li><li> Learn how to use the style file. See <a href="Style.html#Style">Style</a>.
</li><li> Use the info options ‘<samp>-@</samp>’, ‘<samp>-D</samp>’, ‘<samp>-y</samp>’, and ‘<samp>-Z</samp>’
to find out about various internal <small>FWEB</small> tables (control codes,
reserved words, memory allocations, and style-file parameters).
See <a href="Info-options.html#Info-options">Info options</a>.
</li><li> Begin all <small>FWEB</small> sources with invisible commentary
bracketed by ‘<samp>@z...@x</samp>’.
See <a href="ATz.html#ATz">ATz</a>.
</li><li> Always include an explicit language-setting command in the limbo
section. Under normal circumstances, do not set the language from the
command line.
See <a href="Languages.html#Languages">Languages</a>.
</li><li> Keep sections quite short.
Knuth suggests a dozen lines. That’s
quite hard to achieve sometimes, but almost never should a section be more
than a page long. If a block of code is longer than that, split it up
using named modules.
</li><li> It’s easy to define macros from the command line to expedite
conditional preprocessing.
See <a href="_002dm.html#g_t_002dm">-m</a>.
</li><li> Use the preprocessor construction ‘<samp>@#if 0...@#endif</samp>’ to
comment out unwanted code.
See <a href="Preprocessing.html#Preprocessing">Preprocessing</a>.
</li><li> For logical operations with the preprocessor, use ‘<samp>||</samp>’, not ‘<samp>|</samp>’.
</li><li> It’s conventional to identify the ends of long preprocessor
constructions as follows:
<div class="example">
<pre class="example">@#if A
.
.
@#endif // |A|
</pre></div>
</li><li> To debug an errant <small>FWEB</small> macro, use the built-in function
‘<samp>$DUMPDEF</samp>’.
See <a href="_0024DUMPDEF.html#g_t_0024DUMPDEF">$DUMPDEF</a>.
</li><li> Use ‘<samp>@?</samp>’ for compiler directives. See <a href="AT_003f.html#AT_003f">AT?</a>.
Use the style-file parameters ‘<samp>cdir_start</samp>’ to specify
information that will be written out at the beginning of the line.
See <a href="cdir_005fstart.html#cdir_005fstart">cdir_start</a>.
</li><li> Stick to the standard <small>FWEB</small> commenting style ‘<samp>/*...*/</samp>’ or
‘<samp>//...</samp>’. Don’t use alternatives such as <small>FORTRAN</small>’s column 1
convention; these may not work or may not be supported someday.
See <a href="Comments.html#Comments">Comments</a>.
</li><li> The meta-comment feature ‘<samp>@(...@)</samp>’ provides a poor-person’s
alignment feature. But it doesn’t work very well, and it’s not in the
spirit of TeX; learn to use ‘<samp>\halign</samp>’ or the LaTeX alternatives.
</li><li> In <small>FORTRAN</small>, use ‘<samp>#:0</samp>’ to declare readable alphabetic statement
labels. See <a href="Tokens.html#Tokens">Tokens</a> and <a href="_002dcolon.html#g_t_002dcolon">-colon</a>.
</li><li> When mixing languages, define the language of a module at the highest
possible level—e.g., in the unamed module, not after ‘<samp>@<...@>=</samp>’.
</li><li> Use LaTeX. Plain TeX is no longer supported. Upgrade to
LaTeX2e. See <a href="LaTeX.html#LaTeX">LaTeX</a>.
</li><li> If you are reading this documentation from printed pages, make sure it’s
also installed as an Info package on your system so it can be read
interactively with <code>emacs</code>. You can also read it through a
World-Wide Web browser such as Netscape. For the address, see
<a href="Support.html#Support">Support</a>.
</li></ol>
<hr>
<div class="header">
<p>
Next: <a href="Science.html#Science" accesskey="n" rel="next">Science</a>, Previous: <a href="Converting.html#Converting" accesskey="p" rel="prev">Converting</a>, Up: <a href="Hints.html#Hints" accesskey="u" rel="up">Hints</a> [<a href="Parameter-index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-index.html#Concept-index" title="Index" rel="index">Index</a>]</p>
</div>
</body>
</html>
|