Changes between Version 11 and Version 12 of WikiMacros
- Timestamp:
- Jul 28, 2005, 5:40:12 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiMacros
v11 v12 5 5 6 6 == Using Macros == 7 Macro calls are enclosed in two ''square brackets''. Like python functions, macros can also have arguments, a comma separated list within parenthes is.7 Macro calls are enclosed in two ''square brackets''. Like python functions, macros can also have arguments, a comma separated list within parentheses. 8 8 9 9 === Examples === … … 59 59 def execute(hdf, args, env): 60 60 # Currently hdf is set only when the macro is called 61 # From a wiki page61 # from a wiki page. 62 62 if hdf: 63 63 hdf.setValue('wiki.macro.greeting', 'Hello World') 64 64 65 # args will be null if the macro is called without parenthes is.65 # args will be null if the macro is called without parentheses. 66 66 args = args or 'No arguments' 67 67 return 'Hello World, args = ' + args