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 - 2006-10-27 - NielsKoldso
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.