![]() |
Source Code Examples | ||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() | Full Sites | Snippets | |||||||
Using Blocks as MacrosContributed by Enrique Bengoechea The current implementation of macros in Htmlpp has two problems:
You can avoid both problems using blocks instead of macros and global variables as the means of passing arguments to the block. Of course, this requires being careful as the variables will be able to be accessed anywhere in the document, and not only in the block. For an example of how to use this trick, have a look at the following snippet, how to make a calendar.
| |||||||||
![]() |
|