<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://hotline.ubersoft.org/Sputnik/wiki/skins/common/feed.css?301"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Mod</id>
		<title>Core Function Mod - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?action=history&amp;feed=atom&amp;title=Core_Function_Mod"/>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Mod&amp;action=history"/>
		<updated>2026-05-01T07:10:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.17.0</generator>

	<entry>
		<id>http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Mod&amp;diff=1211&amp;oldid=prev</id>
		<title>UberFoX: Created page with &quot;&lt;pre&gt; Mod( &lt;expression&gt;, &lt;expression2&gt; ) &lt;/pre&gt;  === Description ===  Performs the modulus operation.  === Parameters ===  ==== expression ====  The dividend.  ==== expression2 =...&quot;</title>
		<link rel="alternate" type="text/html" href="http://hotline.ubersoft.org/Sputnik/wiki/index.php?title=Core_Function_Mod&amp;diff=1211&amp;oldid=prev"/>
				<updated>2011-12-02T16:34:07Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;lt;pre&amp;gt; Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; ) &amp;lt;/pre&amp;gt;  === Description ===  Performs the modulus operation.  === Parameters ===  ==== expression ====  The dividend.  ==== expression2 =...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Mod( &amp;lt;expression&amp;gt;, &amp;lt;expression2&amp;gt; )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Description ===&lt;br /&gt;
&lt;br /&gt;
Performs the modulus operation.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== expression ====&lt;br /&gt;
&lt;br /&gt;
The dividend.&lt;br /&gt;
&lt;br /&gt;
==== expression2 ====&lt;br /&gt;
&lt;br /&gt;
The divisor.&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
&lt;br /&gt;
quotient = dividend / divisor.&lt;br /&gt;
&lt;br /&gt;
=== Remarks ===&lt;br /&gt;
&lt;br /&gt;
Some might wonder the point of such a function when clear % operators exist but why not!.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$n = 18;&lt;br /&gt;
If ( Mod($n, 2) == 0 )&lt;br /&gt;
{&lt;br /&gt;
    println(&amp;quot;$n is an even number.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
    println(&amp;quot;$n is an odd number.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$x = Mod(4, 7);&lt;br /&gt;
println($x); // $x == 4 because the divisor &amp;gt; dividend&lt;br /&gt;
&lt;br /&gt;
$y = Mod(1, 3.0/4.0); // We had to place .0 onto the end just so it forces it to be a double&lt;br /&gt;
println($y); // $y == 0.25 because the divisor is a float&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course we could just use the % modulus operator&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sputnik&amp;quot;&amp;gt;&lt;br /&gt;
$n = 18;&lt;br /&gt;
If ( $n % 2 == 0 )&lt;br /&gt;
{&lt;br /&gt;
    println(&amp;quot;$n is an even number.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
Else&lt;br /&gt;
{&lt;br /&gt;
    println(&amp;quot;$n is an odd number.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
$x = 4 % 7;&lt;br /&gt;
println($x); // $x == 4 because the divisor &amp;gt; dividend&lt;br /&gt;
&lt;br /&gt;
$y = 1 % 3.0/4.0; // We had to place .0 onto the end just so it forces it to be a double&lt;br /&gt;
println($y); // $y == 0.25 because the divisor is a float&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Function]]&lt;/div&gt;</summary>
		<author><name>UberFoX</name></author>	</entry>

	</feed>