<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://www.fenixdocs.com/skins/common/feed.css?63"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=If</id>
		<title>If - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.fenixdocs.com/index.php?action=history&amp;feed=atom&amp;title=If"/>
		<link rel="alternate" type="text/html" href="http://www.fenixdocs.com/index.php?title=If&amp;action=history"/>
		<updated>2026-05-02T15:55:59Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.10.1</generator>

	<entry>
		<id>http://www.fenixdocs.com/index.php?title=If&amp;diff=3660&amp;oldid=prev</id>
		<title>Sandman at 12:43, 9 November 2007</title>
		<link rel="alternate" type="text/html" href="http://www.fenixdocs.com/index.php?title=If&amp;diff=3660&amp;oldid=prev"/>
				<updated>2007-11-09T12:43:15Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 12:43, 9 November 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 5:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 5:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;[[Control flow statements|'''Up to Control Flow Statements''']]&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;[[Control flow statements|'''Up to Control Flow Statements''']]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;----&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;----&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://www.fenixdocs.com/index.php?title=If&amp;diff=3657&amp;oldid=prev</id>
		<title>Sandman: /* Definition */</title>
		<link rel="alternate" type="text/html" href="http://www.fenixdocs.com/index.php?title=If&amp;diff=3657&amp;oldid=prev"/>
				<updated>2007-11-09T12:33:55Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Definition&lt;/span&gt;&lt;/p&gt;

			&lt;table border='0' width='98%' cellpadding='0' cellspacing='4' style=&quot;background-color: white;&quot;&gt;
			&lt;tr&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' width='50%' align='center' style=&quot;background-color: white;&quot;&gt;Revision as of 12:33, 9 November 2007&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 10:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 10:&lt;/strong&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Definition ==&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;'''IF''' ( &amp;lt;condition&amp;gt; )&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;'''IF''' ( &amp;lt;condition&amp;gt; )&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&amp;lt;code&amp;gt;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;&amp;lt;code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;br&lt;/ins&gt;&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;['''ELSEIF''' ( &amp;lt;condition&amp;gt; )&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;['''ELSEIF''' ( &amp;lt;condition&amp;gt; )&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&amp;lt;code&amp;gt;]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;&amp;lt;code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&amp;lt;/nowiki&lt;/ins&gt;&amp;gt;]&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;['''ELSE'''&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;['''ELSE'''&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;&amp;lt;code&amp;gt;]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;nowiki&amp;gt;&lt;/ins&gt;&amp;lt;code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;gt;&amp;lt;/nowiki&lt;/ins&gt;&amp;gt;]&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;br&amp;gt;&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;'''END'''&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;'''END'''&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;'''If''' statements are used to control the flow of your program by means of checking &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a condition&lt;/del&gt;.&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;'''If''' statements are used to control the flow of your program by means of checking &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;conditions&lt;/ins&gt;.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://www.fenixdocs.com/index.php?title=If&amp;diff=3656&amp;oldid=prev</id>
		<title>Sandman: New page: category:reserved category:language category:control flow statements  '''Up to Control Flow Statements''' ----    == Definition ==  '''IF''' ( &lt;cond...</title>
		<link rel="alternate" type="text/html" href="http://www.fenixdocs.com/index.php?title=If&amp;diff=3656&amp;oldid=prev"/>
				<updated>2007-11-09T12:31:51Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/index.php/Category:Reserved&quot; title=&quot;Category:Reserved&quot;&gt;category:reserved&lt;/a&gt; &lt;a href=&quot;/index.php/Category:Language&quot; title=&quot;Category:Language&quot;&gt;category:language&lt;/a&gt; &lt;a href=&quot;/index.php?title=Category:Control_flow_statements&amp;amp;action=edit&quot; class=&quot;new&quot; title=&quot;Category:Control flow statements&quot;&gt;category:control flow statements&lt;/a&gt;  &lt;a href=&quot;/index.php/Control_flow_statements&quot; title=&quot;Control flow statements&quot;&gt;'''Up to Control Flow Statements'''&lt;/a&gt; ----    == Definition ==  '''IF''' ( &amp;lt;cond...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[category:reserved]]&lt;br /&gt;
[[category:language]]&lt;br /&gt;
[[category:control flow statements]]&lt;br /&gt;
&lt;br /&gt;
[[Control flow statements|'''Up to Control Flow Statements''']]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition ==&lt;br /&gt;
&lt;br /&gt;
'''IF''' ( &amp;lt;condition&amp;gt; )&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
['''ELSEIF''' ( &amp;lt;condition&amp;gt; )&lt;br /&gt;
&amp;lt;code&amp;gt;]&lt;br /&gt;
['''ELSE'''&lt;br /&gt;
&amp;lt;code&amp;gt;]&lt;br /&gt;
'''END'''&lt;br /&gt;
&lt;br /&gt;
'''If''' statements are used to control the flow of your program by means of checking a condition.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if( &amp;lt;condition1&amp;gt; )&lt;br /&gt;
    // code1&lt;br /&gt;
elseif( &amp;lt;condition2&amp;gt; )&lt;br /&gt;
    // code2&lt;br /&gt;
else&lt;br /&gt;
    // code3&lt;br /&gt;
end&lt;br /&gt;
// code4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If at the time the program reaches this '''if'''-codeblock ''condition1'' is [[true]], then ''code1'' will be executed and then ''code4''.&lt;br /&gt;
If ''condition1'' is [[false]], the program will go to the next '''elseif''' or and check if that is true or false: if ''condition2'' is true, ''code2'' and then ''code4'' is executed. If ''condition2'' is false, the program will check the next '''elseif''' and do the same thing over, until the program reaches the '''else''' or the '''end'''.&lt;br /&gt;
If an '''else''' is present, the code in the '''else'''-block will thus be executed when all other conditions are false.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
=== Execute function ===&lt;br /&gt;
This is a little example of how to make a function perform a certain task depending on a command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Function int execute(String command, int* params)&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    if( command == &amp;quot;SEND&amp;quot; )&lt;br /&gt;
        NET_Send(atoi(params[0]),params[1]);&lt;br /&gt;
    elseif( command == &amp;quot;RECV&amp;quot; )&lt;br /&gt;
        NET_Recv(atoi(params[0]));&lt;br /&gt;
    elseif( command == &amp;quot;INIT&amp;quot; )&lt;br /&gt;
        NET_Init(atoi(params[0]),atoi(params[1]),atoi(params[2]));&lt;br /&gt;
    elseif( command == &amp;quot;QUIT&amp;quot; )&lt;br /&gt;
        NET_Quit();&lt;br /&gt;
    else&lt;br /&gt;
        // error: command unknown&lt;br /&gt;
        return -1;&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Movement ===&lt;br /&gt;
Movement with '''If'''s.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Loop&lt;br /&gt;
    if(key(_up))    y-=5; end&lt;br /&gt;
    if(key(_down))  y+=5; end&lt;br /&gt;
    if(key(_left))  x-=5; end&lt;br /&gt;
    if(key(_right)) x+=5; end&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Of course, this is faster:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Loop&lt;br /&gt;
    y += 5 * (key(_down )-key(_up  ));&lt;br /&gt;
    x += 5 * (key(_right)-key(_left));&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>