Passing Parameters to a Template

You can pass parameters to a template, using the syntax:%t(p1,p2...)%.

Parameter values cannot contain any % characters (you cannot pass a template), and are separated by commas. They are retrieved in the template using local variables with the names @1, @2, ....
Examples
The following template call:
%myTemplate(fine,sunny,24,12)%
calls %myTemplate%:
The weather today is %@1% and %@2%, with a high of %@3% and a low of %@4%.
Result:
The weather today is fine and sunny, with a high of 24 and a low of 12.
The template %Attributes% is defined as follows:
.foreach_item(Attributes)
 .if (%Visibility% == %@1%)
 %DataType% %Code%
 .endif
.next(\n)
The template %AttributeList% calls %Attributes% three times, passing a different visibility value each time to loop over only the attributes that have this visibility:
Class "%Code%" attributes: 
// Public 
%attributes(+)% 

// Protected 
%attributes(#)% 

// Private 
%attributes(-)%
Result:
Class "C1" attributes :
// Public
 int height
 int width

// Protected
 int shape

// Private
 int cost
 int price