Manual:DIL Manual/zone head()

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 23:15, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

zone_head()

Function (zoneptr). Another name for zhead(): the first zone in the game.

zone_head()

Exactly the same as zhead(): vmc compiles both to the same call. It returns the first zone in alphabetical order of zone name; each zone's next is the one after it, and null after the last.

Returns

Zoneptr: the first zone.

Notes

  • The public zones use zhead(); see that page for the details.

Example

dilbegin integer zone_count();
var
   z : zoneptr;
   n : integer;
code
{
   z := zone_head();
   while (z)
   {
      n := n + 1;
      z := z.next;
   }
   return (n);
}
dilend

Counts the zones in the game.

See also