PPWIZARD Manual
[Bottom][Contents][Search][Prev]: Options - [Next]: OL_DOC_HEADINGS_DONT_GENERATE_TITLE

DocType

This is a definition which must be set. It indicates the type of output that you required.

It may support more types in future (so you should code accordingly as much as possible), currently support are:

Note that this definition would not normally be used in the source code as this would require you to modify the source to change the output type! You could normally use the "/Define" switch to define the mode.

A short hand method of testing the type of output being generated is to use the <$Html> and <$Ipf> tags.

EXAMPLE

I recommend as much as possible that you keep your source clear of conditional generation code, a much better way is to keep all conditional stuff in one place and create some macros to hide the differences such as demonstrated here (you may wish to create your own header file which loads "OL_DOC.DH" and sets up the rest of your environment):

    ;--- Lets create some macros ourselves --------------------------------------
    #define RedBold  <$Red Text=<$Bold Text=Û{$Text}Û>>   ;;Uses preexisting macros only
    #if    ['<$DocType>' = 'HTML']
           ;--- HTML ------------------------------------------------------------
           #define MyGreen  <FONT COLOR=GREEN>{$Text}</FONT>
    #elseif
           ;--- IPF -------------------------------------------------------------
           #define MyGreen  :color fc=darkgreen.{$Text}:color fc=default.
    #endif
    

EXAMPLE

Here I wish to ensure that my code can handle the document type, "OL_DOC.DH" does its own validation however it may have recently introduced a new type that I may need to do something about if I wish to use it. I will not try to (for now) generate anything but HTML or IPF, so lets validate this:

    ;--- As I user I only support HTML & IPF ---
    #if  '<$DocType>' <> 'HTML' & '<$DocType>' <> 'IPF'
         #error  'I do not support the document type "<$DocType>"!'
    #endif
    


[Top][Contents][Search][Prev]: Options - [Next]: OL_DOC_HEADINGS_DONT_GENERATE_TITLE

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Tuesday January 02 2001 at 7:37am