Using FPDOC is quite simple. It takes some command-line options, and based on these options, creates documentation. The command-line options can be given as long or short options, as is common for most GNU programs.
In principle, only 2 command-line options are needed:
Some examples:
fpdoc --package=fcl --input=crt.pp |
fpdoc --package=fcl --input='-I../inc -S2 -DDebug classes.pp' |
(for more information about these options, see the Free Pascal compiler user’s guide)
With the above commands, a set of documentation files will be generated in HTML format (this is the standard). There will be no description of any of the identifiers found in the unit’s interface section, but all identifiers declarations will be present in the documentation.
The actual documentation (i.e. the description of each of the identifiers) resides in a description file, which can be specified with the descr option:
fpdoc --package=fcl --descr=crt.xml --input=crt.pp |
fpdoc --package=fcl --descr=classes.xml \ --input='-I../inc -S2 -DDebug classes.pp' |
More than one input file or description file can be given:
fpdoc --package=fcl --descr=classes.xml --descr=process.xml \ --input='-I../inc -S2 -DDebug classes.pp' \ --input='-I../inc -S2 -DDebug process.pp' |
The format of the description file is discussed in the next chapter.
Other formats can be generated, such as latex:
fpdoc --format=latex --package=fcl \ --descr=classes.xml --descr=process.xml\ --input='-I../inc -S2 -DDebug classes.pp' \ --input='-I../inc -S2 -DDebug process.pp' |
The output of FPDOC can be further customised by several command-line options, which will be explained in the next section.