/usr/share/doc/fweb/html-info/Setting-the-language.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 | <!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: Setting the language</title>
<meta name="description" content="FWEB: Setting the language">
<meta name="keywords" content="FWEB: Setting the language">
<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="Languages.html#Languages" rel="up" title="Languages">
<link href="C.html#C" rel="next" title="C">
<link href="Languages.html#Languages" rel="prev" title="Languages">
<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="Setting-the-language"></a>
<div class="header">
<p>
Next: <a href="C.html#C" accesskey="n" rel="next">C</a>, Previous: <a href="Languages.html#Languages" accesskey="p" rel="prev">Languages</a>, Up: <a href="Languages.html#Languages" accesskey="u" rel="up">Languages</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="Setting-the-language-1"></a>
<h3 class="section">8.1 Setting the language</h3>
<a name="index-Language_002c-setting-2"></a>
<p>The most general form of a language command is
</p>
<blockquote>
<p>@<i>[</i>L<i>]ltext</i>[<i>options</i>]
</p></blockquote>
<p>where <i>l</i> is a language symbol, <i>text</i> is converted into the
option ‘<samp>-<i>l</i>text</samp>’, and <i>options</i> have the same syntax as on the
command line.
</p>
<p>The language symbols must be in lower case; they are
</p>
<blockquote>
<table>
<tr><td>C</td><td><code>c</code></td></tr>
<tr><td>C++</td><td><code>c++</code></td></tr>
<tr><td>Fortran-77</td><td><code>n</code></td></tr>
<tr><td>Fortran-90</td><td><code>n9</code></td></tr>
<tr><td>Ratfor-77</td><td><code>r</code></td></tr>
<tr><td>Ratfor-90</td><td><code>r9</code></td></tr>
<tr><td>TeX</td><td><code>x</code></td></tr>
<tr><td>VERBATIM</td><td><code>v</code></td></tr>
</table>
</blockquote>
<p>An example of a command with the optional <i>text</i> field is ‘<samp>@n/</samp>’.
By definition, this is equivalent to ‘<samp>@n[-n/]</samp>’. Thus, it both sets
the language and invokes a command-line option.
</p>
<p>As another example, ‘<samp>@n9</samp>’ really means ‘<samp>@n[-n9]</samp>’. Thus the
language is first set to <small>FORTRAN</small>, then reset to <small>FORTRAN</small>-90.
One doesn’t need to worry about this detail.
</p>
<div class="example">
<pre class="example">@n9[-n&]
</pre></div>
<p>means set the language to <small>FORTRAN</small>–90 and use free-form syntax with the
ampersand as the continuation character. (This construction is now
<small>FWEB</small>’s default.)
</p>
<p>The brackets may contain more than one space-delimited option.
</p>
<p>A language command should appear somewhere in limbo, before the start of
the first section. The language in effect at the beginning of the first
section defines the global language. For historical reasons, the
default language is <small>FORTRAN</small>-77, but <em>do not rely on this;
always include a language command</em>.
</p>
<p>Language commands may be used within sections, but the new language
remains in force only for that section. The language of a named module
is inherited from the language in effect at the time the name is first
used. Thus, in the following example, the global language is
<small>FORTRAN</small>–77, but an arbitrary number of C functions can be placed into a
C-language module with just one ‘<samp>@c</samp>’ language-changing command.
</p>
<div class="example">
<pre class="example">@n
@
@a
program main
end
@c
@<C@>@;
@
@<C@>=
int fcn()
{}
</pre></div>
<p><small>FTANGLE</small> will write two output files for this example—e.g.,
<samp>test.f</samp> and <samp>test.c</samp>. Particularly note that one did not
need an ‘<samp>@c</samp>’ command in the last section because the language was
C when ‘<samp>@<C@></samp>’ was first encountered.
</p>
<a name="Special-hints-and-considerations-for-each-language"></a>
<h3 class="section">8.2 Special hints and considerations for each language</h3>
<p>One important thing to keep in mind is that in <small>FWEB</small> an identifier
may have, for each language, precisely one meaning throughout the
document. This restriction is not necessarily in accord with the
syntaxes of the various source languages. See, for example, the
discussions in <a href="Cpp.html#Cpp">Cpp</a> and <a href="Fortran.html#Fortran">Fortran</a>.
</p>
<hr>
<div class="header">
<p>
Next: <a href="C.html#C" accesskey="n" rel="next">C</a>, Previous: <a href="Languages.html#Languages" accesskey="p" rel="prev">Languages</a>, Up: <a href="Languages.html#Languages" accesskey="u" rel="up">Languages</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>
|