MOD examples (Version: 3) - Miva - Snippets
<h2>MivaScript MOD</h2> <p>MivaScript has a built in Modulus operator: <code>MOD</code></p> <mvt:assign name="l.settings:mod" value="1 MOD 3" /> <code>1 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="2 MOD 3" /> <code>2 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="3 MOD 3" /> <code>3 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="4 MOD 3" /> <code>4 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="5 MOD 3" /> <code>5 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="6 MOD 3" /> <code>6 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="7 MOD 3" /> <code>7 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="8 MOD 3" /> <code>8 MOD 3</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="9 MOD 3" /> <code>9 MOD 3</code> = &mvte:mod;<br/><br/> <mvt:assign name="l.settings:mod" value="1 MOD 4" /> <code>1 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="2 MOD 4" /> <code>2 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="3 MOD 4" /> <code>3 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="4 MOD 4" /> <code>4 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="5 MOD 4" /> <code>5 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="6 MOD 4" /> <code>6 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="7 MOD 4" /> <code>7 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="8 MOD 4" /> <code>8 MOD 4</code> = &mvte:mod;<br/> <mvt:assign name="l.settings:mod" value="9 MOD 4" /> <code>9 MOD 4</code> = &mvte:mod;<br/><br/>