\define One(p1, p2);Inside One:This is p1 in One: <$text text=<<__p1__>> />:This is p2 in One: <$text text=<<__p2__>> />
!!Call Two without passing p1, p2
<<Two p3:300>>\end
\define Two(p3);Inside Two:This is p1 in Two: <$text text=<<__p1__>> />:This is p2 in Two: <$text text=<<__p2__>> />\end
<<One p1:100 p2:200>>$p1$--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/dd722b10-dd34-477c-ab28-a7af336ac9f7%40googlegroups.com.
Hi MohammadYour conclusions are correct: macro parameters referenced as variables are inherited like any other variables.To show what happens behind the scenes, a macro like this:
\define mymacro(a,b)<$text text=<<__a__>>/>: <$text text=<<__b__>>/>.\endWould be equivalent to the following version that explicitly assigns to the variables:\define mymacro(a,b)<$set name="__a__" value="""$a$"""><$set name="__b__" value="""$b$"""><$text text=<<__a__>>/>: <$text text=<<__b__>>/>.</$set></$set>\endBest wishesJeremy
To unsubscribe from this group and stop receiving emails from it, send an email to tiddl...@googlegroups.com.
If so is this a way to "evaluate" a macro result into a string?
`\define stringval() $(varname)$
<$wikify name=varname text="{{!!field}} and <<othervar>>" >
<<stringval>>`
If so perhaps it would be nice if we could use $(varname)$ directly in wiki text? Rather than only inside a macro definition.
I assume $(varname)$ continues into subsequent macro calls?
regards
Tony