- %% Example of macro usage in Platypus.
- %%
- %% Comments are in green, commands in blue, text in black.
- %% To verify, hover the cursor over any colored element.
- %% -------------------------------------------------------
- %%
- %% Define the macros
- %%
- [def:BOBOTW{ bottles of beer on the wall, }]
- [def:BOB{ bottles of beer;}]
- [def:T1down{Take one down, pass it around, }]
- [def:Qty{99}]
- %%
- %% Print the text using the macros, redefining Qty, as you go
- %%
- [paraindent:0][paraskip:0li]
- [*Qty][*BOBOTW][*Qty][*BOB][]
- [*T1down][def:Qty{98}][*Qty][*BOB][]
- [*Qty][*BOBOTW][*Qty][*BOB][]
- [*T1down][def:Qty{97}][*Qty][*BOB][]
- [*Qty][*BOBOTW][*Qty][*BOB][]
- [*T1down][def:Qty{96}][*Qty][*BOB][]
- etc...
- [%% The resulting text is a formatted verison of:
- 99 bottles of beer on the wall, 99 bottles of beer;
- Take one down, pass it around, 98 bottles of beer;
- 98 bottles of beer on the wall, 98 bottles of beer;
- Take one down, pass it around, 97 bottles of beer;
- 97 bottles of beer on the wall, 97 bottles of beer;
- Take one down, pass it around, 96 bottles of beer;
- etc...
- %%]