Files
2026-07-04 17:07:24 -04:00

76 lines
3.3 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800">
<style>
.bg{fill:#0a0a0f}.pnl{fill:#12121a;stroke:#1a1a2e}.hdr{fill:#12121a}
.title{font:bold 42px 'Courier New',monospace;fill:#00ff41}
.sub{font:bold 28px 'Courier New',monospace;fill:#00d4ff}
.txt{font:24px 'Courier New',monospace;fill:#c0c0c0}
.dim{font:20px 'Courier New',monospace;fill:#888}
.grn{font:bold 24px 'Courier New',monospace;fill:#00ff41}
.red{font:bold 24px 'Courier New',monospace;fill:#ff0040}
.cyn{font:bold 24px 'Courier New',monospace;fill:#00d4ff}
.amb{font:bold 24px 'Courier New',monospace;fill:#ffaa00}
.badge{stroke:#00ff41;rx:14}
</style>
<rect class="bg" width="1200" height="800"/>
<rect class="hdr" x="0" y="0" width="1200" height="100" rx="0"/>
<text class="title" x="600" y="52" text-anchor="middle">Variable Flow</text>
<text class="dim" x="600" y="88" text-anchor="middle">Tracing x Through Every Operator</text>
<!-- Variable trace table -->
<rect class="pnl" x="30" y="110" width="1140" height="650" rx="8"/>
<text class="sub" x="50" y="150">Tracing x Step-by-Step</text>
<!-- Header row -->
<text class="amb" x="50" y="195">Line</text>
<text class="amb" x="520" y="195">x</text>
<text class="amb" x="640" y="195">Result</text>
<line x1="50" y1="205" x2="1140" y2="205" stroke="#1a1a2e" stroke-width="1"/>
<!-- Row 1: init -->
<text class="cyn" x="50" y="240">int x = 5, y = 10;</text>
<text class="grn" x="520" y="240">5</text>
<text class="dim" x="640" y="240">x initialized to 5</text>
<!-- Row 2: arithmetic -->
<text class="txt" x="50" y="280">int arithmetic = (x * y);</text>
<text class="grn" x="520" y="280">5</text>
<text class="txt" x="640" y="280">arithmetic = 50</text>
<!-- Row 3: post-increment -->
<text class="txt" x="50" y="320">int increment = x++;</text>
<text class="red" x="520" y="320">5-->6</text>
<text class="txt" x="640" y="320">increment = 5</text>
<text class="dim" x="640" y="345">use THEN increment</text>
<!-- Row 4: relational -->
<text class="txt" x="50" y="385">bool relational = (x &gt; y);</text>
<text class="grn" x="520" y="385">6</text>
<text class="txt" x="640" y="385">relational = false</text>
<text class="dim" x="640" y="410">6 &gt; 10 is false</text>
<!-- Row 5: logical -->
<text class="txt" x="50" y="450">bool logical = (x&gt;y)&amp;&amp;(y&gt;x);</text>
<text class="grn" x="520" y="450">6</text>
<text class="txt" x="640" y="450">logical = false</text>
<text class="dim" x="640" y="475">false AND true = false</text>
<!-- Row 6: bitwise -->
<text class="txt" x="50" y="515">int bitwise = (x&lt;&lt;1);</text>
<text class="grn" x="520" y="515">6</text>
<text class="txt" x="640" y="515">bitwise = 12</text>
<text class="dim" x="640" y="540">0b0110 &lt;&lt; 1 = 0b1100</text>
<!-- Row 7: assignment -->
<text class="txt" x="50" y="580">int assignment = (x += 5);</text>
<text class="red" x="520" y="580">6-->11</text>
<text class="txt" x="640" y="580">assignment = 11</text>
<text class="dim" x="640" y="605">6 + 5 = 11</text>
<!-- DHT11 output -->
<line x1="50" y1="635" x2="1140" y2="635" stroke="#1a1a2e" stroke-width="1"/>
<text class="sub" x="50" y="670">DHT11 Output</text>
<text class="grn" x="50" y="705">Humidity: 51.0%</text>
<text class="grn" x="400" y="705">Temperature: 23.8C</text>
<text class="dim" x="50" y="735">dht11_read(&amp;hum, &amp;temp) -- passes addresses so function can write values</text>
</svg>