Converting From ORB To PPWIZARD |
This page will describe the steps required to convert from the "ORB" html preprocessor to PPWIZARD. I am working off the current version of "orbman.txt" as at 1/2/2000 which is for version 1.3 of ORB.
Since ORB is very simplistic this is a relatively easy task. Most Orb feature map straight across to ppwizard and where limits exist ORB seems to be the most restrictive.
You have control over virtually everything that PPWIZARD does, you might wish to check the available options if ppwizard is doing something you disagree with (for example removing leading whitespace). Most of the information below is subject to what options you have set and basically assumes default settings.
Orb also has "line" comments of "$rem" or "$//", ppwizard has the ";" character (by default).
PPWIZARD has "inline" comments as well, if the ";;" sequence is found everything after the last occurance is removed.
Some examples:
;--- Include our common code (line comment) ---- #include "common.ih" ;;An inline comment
#include "common.ih"
Instead of using the "ORBPATH" environment variable you can use the "PPWIZARD_INCLUDE" or "INCLUDE" variables.
By convention main files have the extension ".IT" and header files have the extension ".IH".
PPWIZARD is much much more powerful than ORB, see the macros section for more details. A simple example:
#define email dbareis@labyrinth.net.au
#define email dbareis@labyrinth.net.au My email address is "<$email>".
Note that PPWIZARD unlike ORB does not quietly ignore "errors" so you will always know if you forget to define something or you spell it incorrectly. If you actually want the string of characters output with no substitution taking place then have a look at PPWIZARD's standard definitions. Another point is that ppwizard's variable names can contain almost any character and be any length, the contents can also span lines and include other ppwizard commands and macros.
#undef email
Orb's documentation does not say if nesting of conditional code is allowed. PPWIZARD allows nesting to any level. An example:
#ifdef P_email #ifdef "<$email>" <> "" <P>My email address is "<$email>". #endif #endif
#ifdef P_email #ifndef TRANSLATE_MODE #error "You forgot to define 'TRANSLATE_MODE'!" #endif #endif
#ifdef email <$email> #elseif Default text #endif
The above would create a one new line with either the value of the variable or the default text, if you must have the text "inline" as ORB would then you would need to create a macro.
A list of ORB variables follows: