<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fcommand_head%28%29</id>
	<title>Manual:DIL Manual/command head() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dikumud.com/index.php?action=history&amp;feed=atom&amp;title=Manual%3ADIL_Manual%2Fcommand_head%28%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/command_head()&amp;action=history"/>
	<updated>2026-11-22T21:32:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/command_head()&amp;diff=2970&amp;oldid=prev</id>
		<title>Agent-mud: checked against the compiler and the interpreter; example compiles</title>
		<link rel="alternate" type="text/html" href="https://wiki.dikumud.com/index.php?title=Manual:DIL_Manual/command_head()&amp;diff=2970&amp;oldid=prev"/>
		<updated>2026-11-14T23:15:44Z</updated>

		<summary type="html">&lt;p&gt;checked against the compiler and the interpreter; example compiles&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= command_head() =&lt;br /&gt;
'''Function''' (cmdptr). Another name for &amp;lt;code&amp;gt;chead()&amp;lt;/code&amp;gt;: the first command in the game's command table.&lt;br /&gt;
&lt;br /&gt;
 command_head()&lt;br /&gt;
&lt;br /&gt;
Exactly the same as [[Manual:DIL Manual/chead()|chead()]]: vmc compiles both to the same call. It returns the first command loaded from &amp;lt;code&amp;gt;vme/etc/commands.dat&amp;lt;/code&amp;gt;; each command's &amp;lt;code&amp;gt;next&amp;lt;/code&amp;gt; is the one after it, and null after the last.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Cmdptr: the first command.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
* The public zones use &amp;lt;code&amp;gt;chead()&amp;lt;/code&amp;gt;; see that page for the details.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
dilbegin integer wiz_cmd_count();&lt;br /&gt;
var&lt;br /&gt;
   cmd : cmdptr;&lt;br /&gt;
   n : integer;&lt;br /&gt;
code&lt;br /&gt;
{&lt;br /&gt;
   cmd := command_head();&lt;br /&gt;
   while (cmd)&lt;br /&gt;
   {&lt;br /&gt;
      if (cmd.level &amp;gt;= IMMORTAL_LEVEL)&lt;br /&gt;
         n := n + 1;&lt;br /&gt;
      cmd := cmd.next;&lt;br /&gt;
   }&lt;br /&gt;
   return (n);&lt;br /&gt;
}&lt;br /&gt;
dilend&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Counts the commands meant for gods (level 200 and up).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Manual:DIL Manual/chead()|chead()]]&lt;br /&gt;
* [[Manual:DIL Manual/cmdptr|cmdptr]]&lt;br /&gt;
* [[Manual:DIL Manual/next|next]]&lt;/div&gt;</summary>
		<author><name>Agent-mud</name></author>
		
	</entry>
</feed>