<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.stridewiki.com/index.php?action=history&amp;feed=atom&amp;title=Studio%3ARestrictions_on_discriminated_unions</id>
	<title>Studio:Restrictions on discriminated unions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.stridewiki.com/index.php?action=history&amp;feed=atom&amp;title=Studio%3ARestrictions_on_discriminated_unions"/>
	<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;action=history"/>
	<updated>2026-04-28T09:38:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.10</generator>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=10966&amp;oldid=prev</id>
		<title>Timd: Text replace - &#039;Category:Unions&#039; to &#039;Category:Studio:Unions&#039;</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=10966&amp;oldid=prev"/>
		<updated>2009-08-21T00:34:30Z</updated>

		<summary type="html">&lt;p&gt;Text replace - &amp;#039;Category:Unions&amp;#039; to &amp;#039;Category:Studio:Unions&amp;#039;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:34, 21 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l95&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Unions]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:Studio&lt;/ins&gt;:Unions]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=10656&amp;oldid=prev</id>
		<title>Timd: Restrictions on discriminated unions moved to Studio:Restrictions on discriminated unions</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=10656&amp;oldid=prev"/>
		<updated>2009-08-18T23:16:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/index.php?title=Restrictions_on_discriminated_unions&quot; class=&quot;mw-redirect&quot; title=&quot;Restrictions on discriminated unions&quot;&gt;Restrictions on discriminated unions&lt;/a&gt; moved to &lt;a href=&quot;/index.php?title=Studio:Restrictions_on_discriminated_unions&quot; title=&quot;Studio:Restrictions on discriminated unions&quot;&gt;Studio:Restrictions on discriminated unions&lt;/a&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:16, 18 August 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=4427&amp;oldid=prev</id>
		<title>Timd at 00:17, 11 March 2008</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=4427&amp;oldid=prev"/>
		<updated>2008-03-11T00:17:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;//www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;amp;diff=4427&amp;amp;oldid=4107&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=4107&amp;oldid=prev</id>
		<title>Timd at 18:45, 29 February 2008</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=4107&amp;oldid=prev"/>
		<updated>2008-02-29T18:45:35Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:45, 29 February 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l81&quot;&gt;Line 81:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 81:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;KB&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Unions&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Timd</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=2011&amp;oldid=prev</id>
		<title>Root at 22:55, 21 June 2007</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=2011&amp;oldid=prev"/>
		<updated>2007-06-21T22:55:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 22:55, 21 June 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l78&quot;&gt;Line 78:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 78:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #pragma scl_ptr(f.pd, INOUT, PRIVATE)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #pragma scl_ptr(f.pd, INOUT, PRIVATE)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #pragma scl_ptr(*f.pd, INRETURN, POOL) &amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  #pragma scl_ptr(*f.pd, INRETURN, POOL) &amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:KB]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=1695&amp;oldid=prev</id>
		<title>Root at 23:22, 12 June 2007</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=1695&amp;oldid=prev"/>
		<updated>2007-06-12T23:22:45Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 23:22, 12 June 2007&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Within a payload (Command or Response), the discriminant may not reside in a payload memory block that is a descendent of the block in which the union resides. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Within a payload (Command or Response), the discriminant may not reside in a payload memory block that is a descendent of the block in which the union resides. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #3: Discriminant may not reside in a memory block comes “after” the union&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #3: Discriminant may not reside in a memory block &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;that &lt;/ins&gt;comes “after” the union&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Within a payload (Command or Response), the discrimiminant may not reside in a memory block that comes after the block containing the union given a pre-order, left, right traversal of memory blocks that make up the payload. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Within a payload (Command or Response), the discrimiminant may not reside in a memory block that comes after the block containing the union given a pre-order, left, right traversal of memory blocks that make up the payload. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Root</name></author>
	</entry>
	<entry>
		<id>https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=1694&amp;oldid=prev</id>
		<title>Root at 23:20, 12 June 2007</title>
		<link rel="alternate" type="text/html" href="https://www.stridewiki.com/index.php?title=Studio:Restrictions_on_discriminated_unions&amp;diff=1694&amp;oldid=prev"/>
		<updated>2007-06-12T23:20:33Z</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;Beginning with STRIDE 2.1, there are restrictions in place for disciminated unions. These restrictions are diagnosed as errors by the SCL language translator if they are encountered.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #1: Union and Discriminant must reside in same payload&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The discriminant for a discriminated union must be present in the Command Payload if the union is present in the Command Payload.  The discriminant for a discriminated union must be present in the Respose Payload if the union is present in the Response Payload.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #2: Discriminant may not reside in a memory block that is a descendent of the block that contains the union.&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Within a payload (Command or Response), the discriminant may not reside in a payload memory block that is a descendent of the block in which the union resides. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #3: Discriminant may not reside in a memory block comes “after” the union&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
Within a payload (Command or Response), the discrimiminant may not reside in a memory block that comes after the block containing the union given a pre-order, left, right traversal of memory blocks that make up the payload. (See section 1.2.11 Payloads for a detailed description of memory blocks)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #4: Union residing in OUT block may not have discriminant residing in RETURN or INRETURN block&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Union/Discriminant Restriction #5: Union residing in INOUT block may not have discriminant that resides in INRETURN block&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Rationale for the Restrictions&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Restriction #1: To eliminate Restriction #1 the host runtime would need to capture and record discrimant values on a call so that on the corresponding return the values could recalled and used to discriminate the union value within the response payload (since the discriminant values cannot be found in the response payload).&lt;br /&gt;
&lt;br /&gt;
Restrictions #2 thru #5 are in place because of the manner in which the host runtime processes I-blocks sent from target to host. The host runtime is designed to process each block fully before reading the next block. This means that the host runtime cannot handle the senario where the union resides in an I-block that arrives prior to the I-block containing the discriminant.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Examples&amp;#039;&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #1:&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 U f(int d);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(f(), f.d);&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #1:&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(int d, U* pu);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(*f.pu, f.d);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(f.pu, OUT, PRIVATE)&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #2:&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 typedef struct S&amp;lt;br&amp;gt;&lt;br /&gt;
 {&amp;lt;br&amp;gt;&lt;br /&gt;
   int *pd;&amp;lt;br&amp;gt;&lt;br /&gt;
   U   u;&amp;lt;br&amp;gt;&lt;br /&gt;
 }S ;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(S s);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(f.s.u, *f.s.pd);&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #2:&amp;#039;&amp;#039;&amp;lt;br&amp;gt;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef struct M1 { int *pd; int x;} M1;&amp;lt;br&amp;gt;&lt;br /&gt;
 typedef struct M2 { int *pd; int y;} M2;&amp;lt;br&amp;gt;&lt;br /&gt;
 typedef union U  { M1 m1; M2 m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(U u);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(f.u, *f.u.m1.pd);&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #3:&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(U* pu, int *pd);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(*f.pu, *f.pd)&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;NOT Restricted by #3 (or any other restriction)&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(int *pd, U* pu);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(*f.pu, *f.pd)&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #4&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(int **pd, U* pu);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(*f.pu, **f.pd)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(f.pu, OUT, PRIVATE)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(f.pd, OUT, PRIVATE)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(*f.pd, RETURN, POOL)&amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&amp;#039;&amp;#039;Restricted by #5&amp;#039;&amp;#039;&lt;br /&gt;
 &amp;lt;tt&amp;gt;typedef union U { int m1; int m2;} U;&amp;lt;br&amp;gt;&lt;br /&gt;
 void f(int **pd, U* pu);&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_function(f)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_union(*f.pu, **f.pd)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(f.pu, INOUT, PRIVATE)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(f.pd, INOUT, PRIVATE)&amp;lt;br&amp;gt;&lt;br /&gt;
 #pragma scl_ptr(*f.pd, INRETURN, POOL) &amp;lt;br&amp;gt;&amp;lt;/tt&amp;gt;&lt;/div&gt;</summary>
		<author><name>Root</name></author>
	</entry>
</feed>