Tags:
create new tag
, view all tags
Fake what IncludedTopicUsedAsMacro would look like had DocumentedDefaultParameterValuesForInclude been implemented.


4. Use as a macro

We have created the macro topic SampleMacroDemonstratingIncludeParams and will use it as a macro below.

First try to view the topic raw to find out what it does. Especially note how we use the %debug% variable to display/hide parameter-table output

We try to invocate the macro twice.

4.a Macro invocation A

We write
%INCLUDE{"SampleMacroDemonstratingIncludeParams"}%

And get...

Order:

  • A medium brunch with boiled eggs.

4.b Macro invocation B

We write
%INCLUDE{"SampleMacroDemonstratingIncludeParams" debug="yes" size="big" egg="porched" }%

And get...

Macro help:

Usage:

  • Order a brunch by writiting %INCLUDE{"SampleMacroDemonstratingIncludeParams" ...}%
  • Fill in parameters as you please, c.f.table below

%INCLUDE{...}% paramters
Name Default value Actual value Documentation
debug
no
»yes« Legal values: yes or no / Show "Macro Help" in IncludedTopicUsedAsMacroFakeIt
egg
boiled
»porched« Legal values: boiled, srambled or porched / How do you want your egg?
size
medium
»big« Legal values: small , medium or large / Size of brunch

Order:

  • A big brunch with porched eggs.
Topic revision: r1 - 27 Oct 2006 - 16:24:27 - NielsKoldso
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback