PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Beginners Guide[Next]: Converting From SSI To PPWIZARD
\ -> Converting From ORB To PPWIZARD

Converting From ORB To PPWIZARD

See ZdNet's review for PPWIZARD (windows, unix, OS/2 and DOS)

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.

  1. Orb Comments
    Orb has block comments using "$comment" and "$endcomment" or "$/*" and "$*/". PPWIZARD does not have block comments except that a #ifdef can be used for this purpose if required.

    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

  2. File Inclusion
    Orb uses "$include" and ppwizard uses #include the variable name is surrounded by "PPWIZARD quotes", for example:
    #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".

  3. Defining Orb Variables
    Orb uses "$define", "$def" or "$set" commands to define variables. PPWIZARD uses the #define command to create its variables. You can also use /define from the command line.

    PPWIZARD is much much more powerful than ORB, see the macros section for more details. A simple example:

    #define email dbareis@labyrinth.net.au

  4. Using Orb Variables
    Orb uses "[[Variable]]" when replacing variables, PPWIZARD uses "<$Variable>", for example:
    #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.

  5. Removing Orb Variables
    Orb uses "$undef" command to remove variables. PPWIZARD uses the #undef command to create its variables. An example:
    #undef email

  6. Conditional Compilation
    PPWIZARD can do much more than ORB (see the #if command) however when ORB uses "$ifdef" or "$ifndef" then ppwizard uses #ifdef or #ifndef.

    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>".

  7. User Defined Errors
    ORB uses "$error" and ppwizard uses #error, for example:
    #ifdef P_email
           #ifndef TRANSLATE_MODE
                   #error "You forgot to define 'TRANSLATE_MODE'!"

  8. User Defined Messages
    ORB uses "$message" or "$msg" to generate messages, ppwizard uses #info and #warning.

  9. ORB's $VAL
    Orb has a "$val" command that ppwizard does not have, you could implement as ppwizard code like:
    #ifdef email
           Default text

    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.

  10. ORB's $TIME
    Orb has a "$time" command and PPWIZARD has a "<?CompileTime>" variable (format can be adjusted).

  11. ORB's $TARGET
    Orb has a "$target" command, ppwizard has a "#output" command (can be nested to any level) which is more powerful but has one major difference, you must also close any file you open. You may wish to use the #OnExit for this.

  12. Predefined ORB Variables
    Firstly you might wish to check out the standard definitions section.

    A list of ORB variables follows:

  13. Line Continuation or Splicing
    PPWIZARD has line continuation characters.

  14. Orb Command Line
    See PPWIZARD's switch documentation.

  15. MAKE
    Not only can ppwizard be used in make files but ppwizard includes a much more powerful mechanism, see the "/DependsOn" command.

email me  any feedback, additional information or corrections.
See this page online (look for updates)

[Top][Contents][Search][Prev]: Beginners Guide[Next]: Converting From SSI To PPWIZARD

My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Sunday November 05 2017 at 10:00am