[Templates-svn] r1053 - trunk/docsrc/lib/dir

svn@template-toolkit.org svn@template-toolkit.org


Author: abw
Date: 2007-04-20 14:36:43 +0100 (Fri, 20 Apr 2007)
New Revision: 1053

Modified:
   trunk/docsrc/lib/dir/if
Log:
clarified Directives docs on operator precedence

Modified: trunk/docsrc/lib/dir/if
===================================================================
--- trunk/docsrc/lib/dir/if	2007-04-20 12:55:04 UTC (rev 1052)
+++ trunk/docsrc/lib/dir/if	2007-04-20 13:36:43 UTC (rev 1053)
@@ -28,9 +28,6 @@
 
     == != < <= > >= && || ! and or not
 
-Note that C<and>, C<or> and C<not> are also provided as aliases for
-C<&&>, C<||> and C<!>, respectively.
-
 Conditions may be arbitrarily complex and are evaluated with the same
 precedence as in Perl.  Parenthesis may be used to explicitly
 determine evaluation order.
@@ -42,5 +39,9 @@
        That's more or less correct.
     [% END %]
 
-
-
+The C<and>, C<or> and C<not> operator are provided as aliases for
+C<&&>, C<||> and C<!>, respectively.  Unlike Perl, which treats 
+C<and>, C<or> and C<not> as separate, lower-precedence versions of the 
+other operators, the Template Toolkit performs a straightforward substitution
+of C<and> for C<&&>, and so on.  That means that C<and>, C<or> and C<not>
+have the same operator precedence as C<&&>, C<||> and C<!>.