<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.59.97.98</id>
	<title>Foenix F256 / Wildbits/K2 Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://f256wiki.wildbitscomputing.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=172.59.97.98"/>
	<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=Special:Contributions/172.59.97.98"/>
	<updated>2026-04-20T08:42:34Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=273</id>
		<title>SuperBASIC</title>
		<link rel="alternate" type="text/html" href="https://f256wiki.wildbitscomputing.com/index.php?title=SuperBASIC&amp;diff=273"/>
		<updated>2024-03-15T15:11:15Z</updated>

		<summary type="html">&lt;p&gt;172.59.97.98: /* Ernestos&amp;#039; tips on if, then, else: */  Added a hint about parsing error messages&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SuperBASIC is inspired by BBC BASIC but offers quite a bit more.&lt;br /&gt;
* [https://github.com/FoenixRetro/f256-superbasic/blob/main/reference/source/f256jr_basic_ref.pdf SuperBASIC Reference Manual].&lt;br /&gt;
* [[SuperBASIC Memory Map]]&lt;br /&gt;
* Watch EMWhite&#039;s excellent intro series on YouTube: [https://www.youtube.com/playlist?list=PLeHjTvk7NPiSqGz4REMH-S4hjYpLS2YNR Full Playlist].&lt;br /&gt;
&lt;br /&gt;
=== An informal list of tips, &amp;quot;gotchas&amp;quot;: ===&lt;br /&gt;
&lt;br /&gt;
===== IF, THEN, ELSE =====&lt;br /&gt;
&lt;br /&gt;
====== Source of this tip: Ernesto ======&lt;br /&gt;
* A regular &amp;lt;code&amp;gt;if then&amp;lt;/code&amp;gt; condition can&#039;t contain an &amp;lt;code&amp;gt;else&amp;lt;/code&amp;gt; statement, as in this example: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then x=10&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you need to do an  &amp;lt;code&amp;gt;if then else&amp;lt;/code&amp;gt; structure,  you actually have to do an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure like in the following example,  skipping the &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement. &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0&amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1&amp;lt;br /&amp;gt;&lt;br /&gt;
30     else&amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2&amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* If you do it in one line it needs to have some colons added, making it look weird like this: &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2:endif&amp;lt;/code&amp;gt;&lt;br /&gt;
* if you dare to omit the &amp;lt;code&amp;gt;endif&amp;lt;/code&amp;gt;  thinking that the &amp;lt;code&amp;gt;if&amp;lt;/code&amp;gt; statement won&#039;t need it, (mmm.., everything is in one line, so no need, right?) -Nope...all hell breaks loose!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0:x=1:else:x=2: REM &amp;quot;&amp;lt;-- Error, omited the endif&amp;quot;&amp;lt;/code&amp;gt; &lt;br /&gt;
* be careful not to add an extra  &amp;lt;code&amp;gt;then&amp;lt;/code&amp;gt; statement by mistake to an &amp;lt;code&amp;gt;if else endif&amp;lt;/code&amp;gt; structure, if you do -All hell breaks loose again!!- &lt;br /&gt;
&amp;lt;code&amp;gt;10 if a=0 then  : rem &amp;quot;&amp;lt;-- Error, THEN is not needed!!!&amp;quot; &amp;lt;br /&amp;gt;&lt;br /&gt;
20     x=1 &amp;lt;br /&amp;gt;&lt;br /&gt;
30     else &amp;lt;br /&amp;gt;&lt;br /&gt;
40     x=2 &amp;lt;br /&amp;gt;&lt;br /&gt;
50 endif&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Debugging hint: If you encounter an error like &amp;quot;open structure&amp;quot; or &amp;quot;endproc without a proc&amp;quot;: do not trust the line number that you are given. The root of the problem is probably in a structure earlier on in the code.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>172.59.97.98</name></author>
	</entry>
</feed>