aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md')
-rw-r--r--vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md23
1 files changed, 11 insertions, 12 deletions
diff --git a/vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md b/vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md
index dc78a3512..a9a43efd9 100644
--- a/vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md
+++ b/vendor/smarty/smarty/docs/designers/language-basic-syntax/language-math.md
@@ -1,25 +1,24 @@
-Math {#language.math}
-====
+# Math
Math can be applied directly to variable values.
+## Examples
+```smarty
+{$foo+1}
- {$foo+1}
+{$foo*$bar}
- {$foo*$bar}
+{* some more complicated examples *}
- {* some more complicated examples *}
+{$foo->bar-$bar[1]*$baz->foo->bar()-3*7}
- {$foo->bar-$bar[1]*$baz->foo->bar()-3*7}
+{if ($foo+$bar.test%$baz*134232+10+$b+10)}
- {if ($foo+$bar.test%$baz*134232+10+$b+10)}
-
- {$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"}
-
- {assign var="foo" value="`$foo+$bar`"}
+{$foo|truncate:"`$fooTruncCount/$barTruncFactor-1`"}
+{assign var="foo" value="`$foo+$bar`"}
+```
-
> **Note**
>
> Although Smarty can handle some very complex expressions and syntax,