PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: Simplest Macros[Next]: Macros With Mandatory Parameters

Multi Line Macros

The subject of macros is reasonably complex (but well worth learning) please ensure you have at least read the macro introduction before reading this section.

Sometimes a macro contains quite a bit of text and to make it easier you might wish to spread the definition over a number of lines. This will also allow you to add comments and spacing to allow it to be easy to read.

When PPWIZARD sees a multi line macro (formatted in a similar manner to the example below - break after macro name) it breaks it up into multiple lines so that any imbedded PPWIZARD commands will get executed.

Also check out the #OneLine command as it is also very useful for creating multiline macros.

Note that for ppwizard commands (within a #define) to be executed when the macro is expanded the commands must be on their own line.

    ;--- Define the macro -------------------------------------
    #define FeedBackParagraphs                                        \
            ;---- First paragraph -----------------------------       \
            <P>I have put a lot of work into this produce and         \
               believe it to be of a very high standard.  I           \
               always appreciate feedback which indicates which       \
               features you use and like and which you don't          \
               like.                                                  \
                                                                      \
            ;---- Second paragraph ----------------------------       \
            <P>Please <A HREF="mailto:<$MyEmailAddress>">email me</A> \
               with tour comments.
    
    ;--- Use the macro ----------------------------------------
    <$FeedBackParagraphs>
    

Notice that the expanded "<$FeedBackParagraphs>" will refer to our previously defined "MyEmailAddress" macro. It is perfectly legal for a macro definition to refer to any number of other definitions.


[Top][Contents][Search][Prev]: Simplest Macros[Next]: Macros With Mandatory Parameters

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Monday January 22 2001 at 5:44pm