<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title><![CDATA[Boriel Basic Forum - Core]]></title>
		<link>https://forum.boriel.com/</link>
		<description><![CDATA[Boriel Basic Forum - https://forum.boriel.com]]></description>
		<pubDate>Wed, 01 Jul 2026 07:40:13 +0000</pubDate>
		<generator>MyBB</generator>
		<item>
			<title><![CDATA[Features breaking compilation in older ZXBasic programs]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=2223</link>
			<pubDate>Fri, 17 Jun 2022 06:51:03 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=1002">MrKOSMOS</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=2223</guid>
			<description><![CDATA[Hello<br />
<br />
So I've been using ZXBasic for a while, and after struggling for a while trying to compile some code finally realised some issues. To sum it up, I tried compiling Souls Remastered, since the keyboard input wasn't working on my Timex TC2048. However, while trying to compile I kept getting IF statement errors, which I attributed to the compiler itself. However, it turned out to be due to comments placed in front of the IFs, which were being recognized as one-line commands and "resolving" the IFs, creating errors with the END IFs afterwards. This seems to date back to a previous version before the one-line IF feature was implemented. In fact, many other ZXBasic games by Retrobytes and even the BerkzMan game from the tutorials page seem to expect this feature to be absent in order to compile, so providing a solution seems like a must.<br />
So what do I propose? Well, I see two solutions: One, adding a legacy option for the compiler, say -L. This would be the easiest, and allow compilation of unmodified older code.<br />
Two: implementing a routine that counts all IFs and END IFs in the program flow and checks if they are the same, as well as checking for comments in front of IFs. This may be a more robust solution, letting everyone program as they want without having to check some obscure command line option.<br />
<br />
Aside from that, there seem to be a few other bugs. There seems to be no check for writing to memory above the 64k limit, since I have written a few programs that, when loaded through the BASIC loader, give an Out Of Memory error on the Spectrum. Other than that, there seems to be a bunch of data added along the print command, which I assume is a character set. But is this really necessary when the program only uses UDGs or spaces? In that case, the whole set could be left out, saving a decent amount of space. It could even be optionally left out, and swapped for the ROM character set.<br />
<br />
Well that would be all, please say what you think]]></description>
			<content:encoded><![CDATA[Hello<br />
<br />
So I've been using ZXBasic for a while, and after struggling for a while trying to compile some code finally realised some issues. To sum it up, I tried compiling Souls Remastered, since the keyboard input wasn't working on my Timex TC2048. However, while trying to compile I kept getting IF statement errors, which I attributed to the compiler itself. However, it turned out to be due to comments placed in front of the IFs, which were being recognized as one-line commands and "resolving" the IFs, creating errors with the END IFs afterwards. This seems to date back to a previous version before the one-line IF feature was implemented. In fact, many other ZXBasic games by Retrobytes and even the BerkzMan game from the tutorials page seem to expect this feature to be absent in order to compile, so providing a solution seems like a must.<br />
So what do I propose? Well, I see two solutions: One, adding a legacy option for the compiler, say -L. This would be the easiest, and allow compilation of unmodified older code.<br />
Two: implementing a routine that counts all IFs and END IFs in the program flow and checks if they are the same, as well as checking for comments in front of IFs. This may be a more robust solution, letting everyone program as they want without having to check some obscure command line option.<br />
<br />
Aside from that, there seem to be a few other bugs. There seems to be no check for writing to memory above the 64k limit, since I have written a few programs that, when loaded through the BASIC loader, give an Out Of Memory error on the Spectrum. Other than that, there seems to be a bunch of data added along the print command, which I assume is a character set. But is this really necessary when the program only uses UDGs or spaces? In that case, the whole set could be left out, saving a decent amount of space. It could even be optionally left out, and swapped for the ROM character set.<br />
<br />
Well that would be all, please say what you think]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[Embedded codes]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=573</link>
			<pubDate>Mon, 28 Oct 2013 19:25:41 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=129">britlion</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=573</guid>
			<description><![CDATA[I see Battle Bunny came up with a good idea here:<br />
<br />
<a href="http://www.worldofspectrum.org/forums/showthread.php?p=732193#post732193" target="_blank" rel="noopener" class="mycode_url">http://www.worldofspectrum.org/forums/sh...post732193</a><br />
<br />
I suggest we steal it, and persuade Boriel to include it in the compiler. So you can do <br />
<br />
Print "{PAPER 3} Hello world" to embed the paper 3 in the string. Or More usefully block graphics and {C} symbol in a more logical format.<br />
<br />
Clearly needs a way of turning on and off globally via command line, and locally or a string via some #command....<br />
<br />
But I think it would make it easier to enter some odd codes.]]></description>
			<content:encoded><![CDATA[I see Battle Bunny came up with a good idea here:<br />
<br />
<a href="http://www.worldofspectrum.org/forums/showthread.php?p=732193#post732193" target="_blank" rel="noopener" class="mycode_url">http://www.worldofspectrum.org/forums/sh...post732193</a><br />
<br />
I suggest we steal it, and persuade Boriel to include it in the compiler. So you can do <br />
<br />
Print "{PAPER 3} Hello world" to embed the paper 3 in the string. Or More usefully block graphics and {C} symbol in a more logical format.<br />
<br />
Clearly needs a way of turning on and off globally via command line, and locally or a string via some #command....<br />
<br />
But I think it would make it easier to enter some odd codes.]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[DEFB]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=468</link>
			<pubDate>Sat, 16 Jun 2012 15:27:19 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=129">britlion</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=468</guid>
			<description><![CDATA[I can do <br />
<br />
DEFB 1,2,3,4<br />
<br />
And I can do<br />
<br />
DEFB "Hello World"<br />
<br />
But I can't do<br />
<br />
DEFB "Hello World",10<br />
<br />
And I wish I could <img src="https://forum.boriel.com/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" />]]></description>
			<content:encoded><![CDATA[I can do <br />
<br />
DEFB 1,2,3,4<br />
<br />
And I can do<br />
<br />
DEFB "Hello World"<br />
<br />
But I can't do<br />
<br />
DEFB "Hello World",10<br />
<br />
And I wish I could <img src="https://forum.boriel.com/images/smilies/smile.png" alt="Smile" title="Smile" class="smilie smilie_1" />]]></content:encoded>
		</item>
		<item>
			<title><![CDATA[speed of compilation]]></title>
			<link>https://forum.boriel.com/showthread.php?tid=408</link>
			<pubDate>Thu, 10 Nov 2011 15:11:30 +0000</pubDate>
			<dc:creator><![CDATA[<a href="https://forum.boriel.com/member.php?action=profile&uid=177">slenkar</a>]]></dc:creator>
			<guid isPermaLink="false">https://forum.boriel.com/showthread.php?tid=408</guid>
			<description><![CDATA[do you think the compilation of speccy games would go faster if the compiler was written in a faster language like java?<br />
<br />
btw yacc is available in java]]></description>
			<content:encoded><![CDATA[do you think the compilation of speccy games would go faster if the compiler was written in a faster language like java?<br />
<br />
btw yacc is available in java]]></content:encoded>
		</item>
	</channel>
</rss>