To convert an existing code to FWEB, one should do the following. (The following simple procedure assumes that one puts all the subroutines into the unnamed module. However, other more elaborate schemes are possible.)
@z...@x. The @z must be the first two
characters of the file.
@n or
@c++.
@a command (switch into unnamed code) before each
program unit (e.g., main program, subroutine, or function).
@a, place an @* or command,
followed by TeX documentation about that particular section of code.
@<Name of
module@> in place of the fragment you're replacing, then put that
fragment somewhere else, prefaced by
and @<Name of module@>=.
@;),
pseudo-expressions (@e), or pseudo-colons (@:)
(see Pseudo-operators).
$PI; see Built-in functions.
emacs one can replace the regular expression
[carriage return, five spaces, something not equal to space, tab, or 0]
with [backslash, carriage return, six spaces]:
M-x replace-regexp RET
C-q C-j \.{\ \ \ \ \ }[\^\.\ tab 0]RET
\\\\ C-q C-j \.{\ \ \ \ \ \ }RET
Get rid of the keywords such as then or end if in favor
of braces. Change singly-quoted character strings to doubly-quoted
ones. The -nC option (see -nC) may be helpful.