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

	<entry>
		<id>http://fenixdocs.com/index.php?title=Memcmp&amp;diff=4663&amp;oldid=prev</id>
		<title>Sandman at 12:46, 29 April 2008</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Memcmp&amp;diff=4663&amp;oldid=prev"/>
				<updated>2008-04-29T12:46:56Z</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:46, 29 April 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 79:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 79:&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;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;&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;tr&gt;&lt;td&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; font-size: smaller;&quot;&gt;Used in example: [[alloc]](), [[memset]](), [[say]](), [[free]](), [[pointer]]&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;Used in example: [[alloc]](), [[memset&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;]](), [[memcmp&lt;/ins&gt;]](), [[say]](), [[free]](), [[pointer]]&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;{{Funcbox&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;  | category = Memory&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;}}&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Memcmp&amp;diff=3313&amp;oldid=prev</id>
		<title>Sandman: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Memcmp&amp;diff=3313&amp;oldid=prev"/>
				<updated>2007-09-09T23:23:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&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 23:23, 9 September 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 49:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 49:&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;    memset(pbyte1,3,elements);&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    memset(pbyte1,3,elements);&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;    memset(pbyte2,3,elements);&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    memset(pbyte2,3,elements);&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;    result = memcmp(pbyte1,pbyte2,elements); // You can also compare the first 5 bytes, or the first elements/2 bytes,&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;    result = memcmp(pbyte1,pbyte2,elements); // You can also compare the first 5 bytes,&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;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;it &lt;/del&gt;depends on what you want.&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;                                             // &lt;/ins&gt;or the first elements/2 bytes, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;it&lt;/ins&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;                                             // depends on what you want.&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;    say(&amp;quot;Memcmp 1: &amp;quot; + result);&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;    say(&amp;quot;Memcmp 1: &amp;quot; + result);&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://fenixdocs.com/index.php?title=Memcmp&amp;diff=2323&amp;oldid=prev</id>
		<title>Sandman at 11:08, 14 May 2007</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Memcmp&amp;diff=2323&amp;oldid=prev"/>
				<updated>2007-05-14T11:08:11Z</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 11:08, 14 May 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 6:&lt;/strong&gt;&lt;/td&gt;
&lt;td colspan=&quot;2&quot; align=&quot;left&quot;&gt;&lt;strong&gt;Line 6:&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;&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;Compares the first ''number'' bytes of the block of memory pointed by ''ptr1'' to the first ''number'' bytes pointed by ''ptr2'', returning zero if they all match or a value different from zero representing which is greater if they do not.&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;Compares the first ''number'' bytes of the block of memory pointed by ''ptr1'' to the first ''number'' bytes pointed by ''ptr2'', returning zero if they all match or a value different from zero representing which is greater if they do not.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; font-size: smaller;&quot;&gt;''Available since [[Fenix]] version [[0.92]].''&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;== Parameters ==&lt;/td&gt;&lt;td&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; font-size: smaller;&quot;&gt;== Parameters ==&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	<entry>
		<id>http://fenixdocs.com/index.php?title=Memcmp&amp;diff=2313&amp;oldid=prev</id>
		<title>Sandman at 15:13, 13 May 2007</title>
		<link rel="alternate" type="text/html" href="http://fenixdocs.com/index.php?title=Memcmp&amp;diff=2313&amp;oldid=prev"/>
				<updated>2007-05-13T15:13:32Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:functions]]&lt;br /&gt;
[[Category:memory]]&lt;br /&gt;
&lt;br /&gt;
==Definition==&lt;br /&gt;
'''INT''' memcmp ( &amp;lt;'''VOID POINTER''' ptr1&amp;gt; , &amp;lt;'''VOID POINTER''' ptr2&amp;gt; , &amp;lt;'''INT''' number&amp;gt; )&lt;br /&gt;
&lt;br /&gt;
Compares the first ''number'' bytes of the block of memory pointed by ''ptr1'' to the first ''number'' bytes pointed by ''ptr2'', returning zero if they all match or a value different from zero representing which is greater if they do not.&lt;br /&gt;
&lt;br /&gt;
== Parameters ==&lt;br /&gt;
{|&lt;br /&gt;
| '''VOID POINTER''' ptr1|| - Pointer to a block of memory&lt;br /&gt;
|-&lt;br /&gt;
| '''VOID POINTER''' ptr2 || - Pointer to a block of memory.&lt;br /&gt;
|-&lt;br /&gt;
| '''INT''' number || - The number of bytes to be checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
'''INT''' : Difference&lt;br /&gt;
{|&lt;br /&gt;
| 0 || - The blocks of memory are identical.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;gt;0 || - The first differing byte in both memory blocks has a greater value in ''ptr1''.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;0 || - The first differing byte in both memory blocks has a greater value in ''ptr2''.&lt;br /&gt;
|}&lt;br /&gt;
A byte ranges from 0 to 255, meaning 189 is a greater value than 105.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Program example;&lt;br /&gt;
Const&lt;br /&gt;
    elements = 10;&lt;br /&gt;
End&lt;br /&gt;
Private&lt;br /&gt;
    byte pointer pbyte1;&lt;br /&gt;
    byte pointer pbyte2;&lt;br /&gt;
    int result;&lt;br /&gt;
End&lt;br /&gt;
Begin&lt;br /&gt;
&lt;br /&gt;
    // Allocate memory&lt;br /&gt;
    pbyte1 = alloc(elements);&lt;br /&gt;
    pbyte2 = alloc(elements);&lt;br /&gt;
&lt;br /&gt;
    // Make the blocks the same and compare&lt;br /&gt;
    memset(pbyte1,3,elements);&lt;br /&gt;
    memset(pbyte2,3,elements);&lt;br /&gt;
    result = memcmp(pbyte1,pbyte2,elements); // You can also compare the first 5 bytes, or the first elements/2 bytes,&lt;br /&gt;
                                             // it depends on what you want.&lt;br /&gt;
    say(&amp;quot;Memcmp 1: &amp;quot; + result);&lt;br /&gt;
&lt;br /&gt;
    // Make the first block have a greater value and compare&lt;br /&gt;
    pbyte1[0] = 4;&lt;br /&gt;
    result = memcmp(pbyte1,pbyte2,elements);&lt;br /&gt;
    say(&amp;quot;Memcmp 2: &amp;quot; + result);&lt;br /&gt;
&lt;br /&gt;
    // Make the blocks the same and compare&lt;br /&gt;
    pbyte2[0] = 4;&lt;br /&gt;
    result = memcmp(pbyte1,pbyte2,elements);&lt;br /&gt;
    say(&amp;quot;Memcmp 3: &amp;quot; + result);&lt;br /&gt;
&lt;br /&gt;
    // Make the first block have a greater value and compare&lt;br /&gt;
    pbyte2[1] = 5;&lt;br /&gt;
    result = memcmp(pbyte1,pbyte2,elements);&lt;br /&gt;
    say(&amp;quot;Memcmp 4: &amp;quot; + result);&lt;br /&gt;
&lt;br /&gt;
    Repeat&lt;br /&gt;
        frame;&lt;br /&gt;
    Until(key(_esc))&lt;br /&gt;
&lt;br /&gt;
    // Free the used memory&lt;br /&gt;
    free(pbyte1);&lt;br /&gt;
    free(pbyte2);&lt;br /&gt;
&lt;br /&gt;
End&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Used in example: [[alloc]](), [[memset]](), [[say]](), [[free]](), [[pointer]]&lt;/div&gt;</summary>
		<author><name>Sandman</name></author>	</entry>

	</feed>