• Currently 0/5
  • 1
  • 2
  • 3
  • 4
  • 5
Arithmetic

"Arithmetic" is a Movable Type plugin that provide ssimple arithmetic operations (addition, subtraction, multiplication,and division).

<p>
<code>&lt;MTAdd x="2" y="2"&gt;</code> results in "4" being output.
</p>

<p>
<code>&lt;MTSetVar2 name="foo" value="2"&gt;</code> followed by
<code>&lt;MTAddVar name="foo" value="2"&gt;</code> followed by
<code>&lt;MTGetVar2 name="foo"&gt;</code> results in "4" being output.
</p>

<p>
<code>&lt;MTSetVar2 name="foo" value="2"&gt;</code> followed by
<code>&lt;MTAddVar name="foo" value="[MTMultiply x='2' y='20']"&gt;</code> followed by
<code>&lt;MTGetVar2 name="foo"&gt;</code> results in "42" being output.
</p>

Requirements

1. "Expressions" plugin by Adam Kalsey

Leave a comment

Have a question? Please use the MT Forums. Notes submitted on documentation should pertain to tips & hints regarding documentation. Your note may be removed once its contents have been integrated into the body of the page.