<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="da">
	<id>https://www.htxarduino.dk/index.php?action=history&amp;feed=atom&amp;title=2-dimensionelt_Array</id>
	<title>2-dimensionelt Array - Versionshistorie</title>
	<link rel="self" type="application/atom+xml" href="https://www.htxarduino.dk/index.php?action=history&amp;feed=atom&amp;title=2-dimensionelt_Array"/>
	<link rel="alternate" type="text/html" href="https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;action=history"/>
	<updated>2026-11-16T18:56:04Z</updated>
	<subtitle>Versionshistorie for denne side i HTX Arduino</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=5134&amp;oldid=prev</id>
		<title>Bar: /* Referencer */</title>
		<link rel="alternate" type="text/html" href="https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=5134&amp;oldid=prev"/>
		<updated>2022-11-24T13:23:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Referencer&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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;da&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Ældre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen fra 24. nov. 2022, 14:23&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-l41&quot;&gt;Linje 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linje 41:&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;==Referencer==&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;==Referencer==&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;&amp;lt;references /&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;&amp;lt;references /&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;{{Programmering}}&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 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;{{Spiludvikling}}&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;{{Spiludvikling}}&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;&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;[[Kategori:Spil_Data-model]]&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;[[Kategori:Spil_Data-model]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Bar</name></author>
	</entry>
	<entry>
		<id>https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3483&amp;oldid=prev</id>
		<title>Bar med 25. okt. 2022, 19:01</title>
		<link rel="alternate" type="text/html" href="https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3483&amp;oldid=prev"/>
		<updated>2022-10-25T19:01:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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;da&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Ældre version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen fra 25. okt. 2022, 20:01&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-l1&quot;&gt;Linje 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Linje 1:&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;[[fil:2DimArray.png|right|thumb|400px|Programmets visning]]&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;[[fil:2DimArray.png|right|thumb|400px|Programmets visning]]  &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;Eksemplet her tager udgangspunkt i Arrays&amp;lt;ref&amp;gt;[https://processing.org/tutorials/arrays/ Arrays Tutorial] på Processing.org&amp;lt;/ref&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;Eksemplet her tager udgangspunkt i Arrays&amp;lt;ref&amp;gt;[https://processing.org/tutorials/arrays/ Arrays Tutorial] på Processing.org&amp;lt;/ref&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>Bar</name></author>
	</entry>
	<entry>
		<id>https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3479&amp;oldid=prev</id>
		<title>Bar: 1 version importeret</title>
		<link rel="alternate" type="text/html" href="https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3479&amp;oldid=prev"/>
		<updated>2022-10-25T19:00:38Z</updated>

		<summary type="html">&lt;p&gt;1 version importeret&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;da&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Ældre version&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Versionen fra 25. okt. 2022, 20:00&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;da&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Ingen forskel)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Bar</name></author>
	</entry>
	<entry>
		<id>https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3478&amp;oldid=prev</id>
		<title>htx_&gt;Bar med 14. nov. 2018, 07:31</title>
		<link rel="alternate" type="text/html" href="https://www.htxarduino.dk/index.php?title=2-dimensionelt_Array&amp;diff=3478&amp;oldid=prev"/>
		<updated>2018-11-14T07:31:52Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny side&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[fil:2DimArray.png|right|thumb|400px|Programmets visning]]&lt;br /&gt;
Eksemplet her tager udgangspunkt i Arrays&amp;lt;ref&amp;gt;[https://processing.org/tutorials/arrays/ Arrays Tutorial] på Processing.org&amp;lt;/ref&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
I princippet er et 2-dimensionelt array blot et [[array]], som indeholder et normal array, der har en-dimensionelle arrays som indhold.&lt;br /&gt;
&lt;br /&gt;
Fordelen ved et 2-dimensionelt [[array_i_Spil|array]] i spilsammenhæng er, at det har en vis afbildning af hvordan elementer af spil ser ud. Det kan være hvordan brikkerne der er faldet ned i et Tetris-spil fylder på spillepladen, det kan være en angivelse af hvor skakbrikkerne står henne i et skakspil, eller hvor bådene ligger henne i sænke slagskib.&lt;br /&gt;
&lt;br /&gt;
==Illustration af et 2-dimensionelt array==&lt;br /&gt;
Programmet her viser blot hvordan et 2-dimensionelt array kan defineres, og fyldes med tal fra 0 til 79.&lt;br /&gt;
&lt;br /&gt;
I [[draw()]] tegnes en repræsentation af arrayet ud fra nogle grafiske betingelser, og indholdet skrives i rektanglerne.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
int xWidth = 10;&lt;br /&gt;
int yHeight = 8;&lt;br /&gt;
int [][] bane = new int [xWidth][yHeight];&lt;br /&gt;
void setup() {&lt;br /&gt;
  int x = 0;&lt;br /&gt;
  for (int n = 0; n &amp;lt; xWidth; n++) {&lt;br /&gt;
    for (int i = 0; i &amp;lt; yHeight; i++) {&lt;br /&gt;
      bane[n][i] = x;&lt;br /&gt;
      x++;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  size(750, 450);&lt;br /&gt;
  strokeWeight(2);&lt;br /&gt;
  textSize(20);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void draw() {&lt;br /&gt;
  background(255);&lt;br /&gt;
  for (int n = 0; n &amp;lt; xWidth; n++) {&lt;br /&gt;
    for (int i = 0; i &amp;lt; yHeight; i++) {&lt;br /&gt;
      fill(255);&lt;br /&gt;
      rect(n*70 + 30, i*50 + 30, 60, 40);&lt;br /&gt;
      fill(0);&lt;br /&gt;
      text(bane[n][i], n*70 + 40, i*50 + 60);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==Referencer==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
{{Spiludvikling}}&lt;br /&gt;
&lt;br /&gt;
[[Kategori:Spil_Data-model]]&lt;/div&gt;</summary>
		<author><name>htx_&gt;Bar</name></author>
	</entry>
</feed>