From: <dba...@us...> - 2009-09-11 07:15:59
|
Revision: 146 http://devmon.svn.sourceforge.net/devmon/?rev=146&view=rev Author: dbaldwin Date: 2009-09-11 07:15:51 +0000 (Fri, 11 Sep 2009) Log Message: ----------- dm_templates.pm - add more MATH operators (fix ^) and add to TEMPLATES doc Modified Paths: -------------- trunk/docs/TEMPLATES trunk/modules/dm_templates.pm Modified: trunk/docs/TEMPLATES =================================================================== --- trunk/docs/TEMPLATES 2009-09-11 07:06:33 UTC (rev 145) +++ trunk/docs/TEMPLATES 2009-09-11 07:15:51 UTC (rev 146) @@ -429,6 +429,10 @@ 'x' (Multiplication) '/' (Division) '^' (Exponentiation) + '%' (Modulo or Remainder) + '&' (bitwise AND) + '|' (bitwise OR) + ' . ' (string concatenation - note white space each side) '(' and ')' (Expression nesting) This transform is not whitespace sensitive, so both: Modified: trunk/modules/dm_templates.pm =================================================================== --- trunk/modules/dm_templates.pm 2009-09-11 07:06:33 UTC (rev 145) +++ trunk/modules/dm_templates.pm 2009-09-11 07:15:51 UTC (rev 146) @@ -534,7 +534,7 @@ $func_type eq 'math' and do { $temp =~ s/:\s*\d+\s*$//; - $temp =~ s/\{\s*\S+?\s*\}|\s|x|\+|\/|-|^|\d+(\.\d*)?|\(|\)\s*//g; + $temp =~ s/\{\s*\S+?\s*\}|\s|\s\.\s|x|\+|\/|-|\^|%|\||&|\d+(\.\d*)?|\(|\)\s*//g; do_log("MATH transform uses only math/numeric symbols and an " . "optional precision number at $trans_file, line $l_num", 0) and next LINE if $temp ne ''; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |