<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FBuiltinFunctions%2FIf</id>
	<title>Dice/BuiltinFunctions/If - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://skizzerz.net/DiceRoller/index.php?action=history&amp;feed=atom&amp;title=Dice%2FBuiltinFunctions%2FIf"/>
	<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/BuiltinFunctions/If&amp;action=history"/>
	<updated>2026-05-21T00:17:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://skizzerz.net/DiceRoller/index.php?title=Dice/BuiltinFunctions/If&amp;diff=775&amp;oldid=prev</id>
		<title>Skizzerz: Created page with &quot;{{APIdoc|BuiltinFunction.If Method (FunctionContext)}} Conditionally returns a result based on a comparison.  {{ns}}  == Syntax == &lt;syntaxhighlight lang=&quot;C#&quot;&gt; [DiceFunction(&quot;i...&quot;</title>
		<link rel="alternate" type="text/html" href="https://skizzerz.net/DiceRoller/index.php?title=Dice/BuiltinFunctions/If&amp;diff=775&amp;oldid=prev"/>
		<updated>2017-04-27T21:52:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{APIdoc|BuiltinFunction.If Method (FunctionContext)}} Conditionally returns a result based on a comparison.  {{ns}}  == Syntax == &amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt; [DiceFunction(&amp;quot;i...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{APIdoc|BuiltinFunction.If Method (FunctionContext)}}&lt;br /&gt;
Conditionally returns a result based on a comparison.&lt;br /&gt;
&lt;br /&gt;
{{ns}}&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;C#&amp;quot;&amp;gt;&lt;br /&gt;
[DiceFunction(&amp;quot;if&amp;quot;, Scope = FunctionScope.Global)]&lt;br /&gt;
public static void If(&lt;br /&gt;
    FunctionContext context&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
; ''context''&lt;br /&gt;
: Type: [[Dice/FunctionContext|Dice.FunctionContext]]&lt;br /&gt;
: The context of the function call.&lt;br /&gt;
&lt;br /&gt;
== Exceptions ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Exception !! Condition&lt;br /&gt;
|-&lt;br /&gt;
| DiceException (DiceErrorCode.IncorrectArity) || context.Arguments.Count is not exactly 3 or 4.&lt;br /&gt;
|-&lt;br /&gt;
| DiceException (DiceErrorCode.IncorrectArgType) || context.Arguments[1] is not a comparison, any of the other arguments is a comparison.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
If the short form (3 argument expression, test, then) is used and the comparison fails, a new DieResult with DieType.Literal is returned with the Value 0. This automatically generated DieResult has the DieFlags.Macro flag.&lt;/div&gt;</summary>
		<author><name>Skizzerz</name></author>
		
	</entry>
</feed>