<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3ADirectives%3ASTRUCT%2FENDSTRUCT</id>
	<title>Z80:Directives:STRUCT/ENDSTRUCT - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=Z80%3ADirectives%3ASTRUCT%2FENDSTRUCT"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Directives:STRUCT/ENDSTRUCT&amp;action=history"/>
	<updated>2026-05-19T06:30:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=Z80:Directives:STRUCT/ENDSTRUCT&amp;diff=249&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=Z80:Directives:STRUCT/ENDSTRUCT&amp;diff=249&amp;oldid=prev"/>
		<updated>2016-02-05T17:52:20Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;These directives can be used to define a structure - a consecutive group of variables with a fixed format.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&lt;br /&gt;
    .struct name&lt;br /&gt;
&lt;br /&gt;
=== Allowed inputs ===&lt;br /&gt;
&lt;br /&gt;
You may only use .var and conditional directives inside a structure&amp;#039;s definition. You can nest structures - for example:&lt;br /&gt;
&lt;br /&gt;
    .struct Point3D&lt;br /&gt;
        .var Point2D, P&lt;br /&gt;
        .var db,      Z&lt;br /&gt;
    .endstruct&lt;br /&gt;
    &lt;br /&gt;
    .var Point3D, You&lt;br /&gt;
    &lt;br /&gt;
        ld a,(You.P.X)&lt;br /&gt;
&lt;br /&gt;
You may not, however, nest a structure onto itself. You might feel tempted, for example, to do the following:&lt;br /&gt;
&lt;br /&gt;
    .struct TreeNode&lt;br /&gt;
        .var word, Value&lt;br /&gt;
        .var TreeNode, RightBranch&lt;br /&gt;
        .var TreeNode, LeftBranch&lt;br /&gt;
    .endstruct&lt;br /&gt;
&lt;br /&gt;
The problem is that that particular structure has an infinite size! If you wish to implement that sort of data structure, you&amp;#039;d use pointers to the branch nodes.&lt;br /&gt;
&lt;br /&gt;
== Uses ==&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Z80:Directives:ENUM|enum]]&lt;br /&gt;
&lt;br /&gt;
{{lowercase}}&lt;br /&gt;
[[Category:Z80 Assembly]]&lt;br /&gt;
[[Category:Z80 Heaven]]&lt;br /&gt;
[[Category:Z80 Directives]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>