Re: why parenthesis is needed inside a simple if expression?

Johannes Klose <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <1214342151.18356.36.camel@jknb>
Am Dienstag, den 24.06.2008, 17:05 -0400 schrieb Zemian Deng:
> In my test script, it only works if I add parenthesis to (x > 5).

Because the greater-than character is also the closing character for
freemarker tags. So, <#if x > 5 > is interpreted as <#if x > and the
following " 5 >" is just plain text.  Paranthesis avoid this - or the
alternate square bracket syntax.

Johannes


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.