Another primary difference is that .rvt files start out with the expectation that they are outputting literal HTML content until the escapement <? ?> sequence is encountered. Think of it as rvt files being "HTML files with embedded blocks of Tcl", while .tcl files are just pure Tcl script starting out in Tcl interpretation mode. I don't think it is wise to change the meanings of .rvt/.tcl to have non-standard interpretations, since it may complicate maintenance and sharing of your code with others in the future.
PHP was initially developed as a HTML language and so when pages are run they are always assumed to be HTML content until the escapement <? ?> sequence is encountered. When you require/include other PHP files within a PHP page, the extension actually doesn't matter (some people use .inc extensions for such included files). Those included files are assumed to be raw PHP-code and do not require an additional escapement sequence since it was being included from such a block. On Sun, Jul 22, 2012 at 5:18 PM, Massimo Manghi <massimo.man...@unipr.it>wrote: > Dear Nagu > > David and Damon should be called in to give a definite answer. The answer > I gave myself was that rvt templates run within the ::request namespace and > this namespace is erased on every request, thus deleting any variable > created in a script embedded in it which was not fully qualified outside > that namespace. There are of course cases where you want to store > persistent application data in some variable and you can do it putting the > in suitable namespace, still you can rely on the fact that everything you > set within a template, unless intentionally scoped outside of it, it will > be destroyed automatically > > cheers > > -- Massimo > > > > > On 2012-07-22 19:46, Nagarajan Chinnasamy wrote: > >> Thanks Massimo. I also realized that they are being treated >> differently, when I re-looked at the source of rivet-ajax example. >> >> This understanding (of .tcl & .rvt being same) was because of my >> hang-over from php which Ive just started learning. >> >> >> Any reason why we have separated them as different (unlike php)? >> >> Best Regards, >> Nagu. >> >> > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > rivet-dev-unsubscribe@tcl.**apache.org<rivet-dev-unsubscr...@tcl.apache.org> > For additional commands, e-mail: rivet-dev-h...@tcl.apache.org > >