mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-09 11:29:58 +00:00
26 lines
770 B
Plaintext
26 lines
770 B
Plaintext
caption: Macro Definitions
|
|
created: 20221007130538285
|
|
modified: 20221019081352266
|
|
tags: WikiText Procedures
|
|
title: Procedure Parameter Handling
|
|
type: text/vnd.tiddlywiki
|
|
|
|
!! Introduction
|
|
|
|
[[Procedure|Procedures]] parameters are made available as variables when the procedure contents are wikified.
|
|
|
|
!! Accessing Parameters as Variables
|
|
|
|
When procedures are wikified, the parameters can be accessed as variables.
|
|
|
|
For example:
|
|
|
|
<$macrocall $name="wikitext-example-without-html" src="""\procedure say-hi(name,address)
|
|
Hi, I'm <<name>> and I live in <<address>>.
|
|
\end
|
|
|
|
<<say-hi name:"Bugs" address:"Rabbit Hole Hill">>
|
|
"""/>
|
|
|
|
Accessing parameters as variables only works in procedures that are wikified and not, for example, when a procedure is used as an attribute value.
|