[sc34wg3] CTM ? semantics
Lars Heuer
heuer at semagia.com
Fri Feb 15 08:35:59 EST 2008
Hi Graham,
[...]
> In templates you often want to create a new topic, and use it locally
> without giving it a subject identifier. Can we have that behaviour back
> please?
The template defines its own scope. If you create a topic via ?foo
within a template, ?foo is not visible outside of the template (unless
you use ?foo as parameter to call another template).
?foo # -> topic 1
def tpl()
?foo # -> topic 2
tpl2(?foo) # tpl2 gets "topic 2"
end
def tpl2($x)
[...]
end
?foo # -> topic 1
Yes, it's not that clear from the spec., but it's clear in my mind and
I'll transfer my thoughts into the spec asap. ;)
Best regards,
Lars
--
http://www.semagia.com
More information about the sc34wg3
mailing list