Next: , Previous: , Up: Hints   [Contents][Index]


13.2 Programming tips and other suggestions

  1. Learn how to use the GNU info browser to access the on-line documentation.
  2. Read the list of new features and changes for the last several releases. See New features.
  3. Periodically check ftp.pppl.gov:/pub/fweb/READ_ME for bug reports and other news. Make bug reports! See Support.
  4. If you have a color terminal, try the option ‘-C1’ (see -C_, see Color).
  5. Any option in .fweb that is intended to be processed after the command-line options should begin with ‘&’ rather than ‘-’. (This is rarely necessary.) See Initialization
  6. Put standard command-line options into .fweb. Also put there standard style parameters—e.g.,
    -pindex.tex "#.ndx"
    -pmodules.tex "#.mds"
    -pcontents.tex "#.cts"
    
  7. Learn how to use the style file. See Style.
  8. Use the info options ‘-@’, ‘-D’, ‘-y’, and ‘-Z’ to find out about various internal FWEB tables (control codes, reserved words, memory allocations, and style-file parameters). See Info options.
  9. Begin all FWEB sources with invisible commentary bracketed by ‘@z...@x’. See ATz.
  10. Always include an explicit language-setting command in the limbo section. Under normal circumstances, do not set the language from the command line. See Languages.
  11. 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.
  12. It’s easy to define macros from the command line to expedite conditional preprocessing. See -m.
  13. Use the preprocessor construction ‘@#if 0...@#endif’ to comment out unwanted code. See Preprocessing.
  14. For logical operations with the preprocessor, use ‘||’, not ‘|’.
  15. It’s conventional to identify the ends of long preprocessor constructions as follows:
    @#if A
    .
    .
    @#endif // |A|
    
  16. To debug an errant FWEB macro, use the built-in function ‘$DUMPDEF’. See $DUMPDEF.
  17. Use ‘@?’ for compiler directives. See AT?. Use the style-file parameters ‘cdir_start’ to specify information that will be written out at the beginning of the line. See cdir_start.
  18. Stick to the standard FWEB commenting style ‘/*...*/’ or ‘//...’. Don’t use alternatives such as FORTRAN’s column 1 convention; these may not work or may not be supported someday. See Comments.
  19. The meta-comment feature ‘@(...@)’ 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 ‘\halign’ or the LaTeX alternatives.
  20. In FORTRAN, use ‘#:0’ to declare readable alphabetic statement labels. See Tokens and -colon.
  21. When mixing languages, define the language of a module at the highest possible level—e.g., in the unamed module, not after ‘@<...@>=’.
  22. Use LaTeX. Plain TeX is no longer supported. Upgrade to LaTeX2e. See LaTeX.
  23. 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 emacs. You can also read it through a World-Wide Web browser such as Netscape. For the address, see Support.

Next: , Previous: , Up: Hints   [Contents][Index]