<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to bugs</title><link href="https://sourceforge.net/p/jbasic/bugs/" rel="alternate"/><link href="https://sourceforge.net/p/jbasic/bugs/feed.atom" rel="self"/><id>https://sourceforge.net/p/jbasic/bugs/</id><updated>2007-04-17T21:17:00Z</updated><subtitle>Recent changes to bugs</subtitle><entry><title>Line number references in compound statements</title><link href="https://sourceforge.net/p/jbasic/bugs/4/" rel="alternate"/><published>2007-04-17T21:17:00Z</published><updated>2007-04-17T21:17:00Z</updated><author><name>Tom Cole</name><uri>https://sourceforge.net/u/tomcole/</uri></author><id>https://sourceforge.netbb264a2593b3a299e6d49eb9a3b71d8fe2c574f3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Line numbers do not work correctly when in compound statements if a RENUMBER is issued.&lt;/p&gt;
&lt;p&gt;For example,&lt;/p&gt;
&lt;p&gt;100    GOTO 800 : GOTO 800 : GOTO 800&lt;/p&gt;
&lt;p&gt;This (admittedly ridiculous) example will not RENUMBER correctly.  The problem is that the array of token positions for line numbers is not offset for the token position in the entire statement; instead it is for the relative position within each sub-statement.  So the above line has three line number token positions, but they are [1, 1, 1], rather than the more correct [1, 4, 7].&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;This will require the compound statement handler in the Statement compile() method to copy sub-statement token position vectors to the parent statement and calculate offsets along the way, mindful of the recursive nature of the compile of each substatement.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Need to support multiple statements on a line</title><link href="https://sourceforge.net/p/jbasic/bugs/3/" rel="alternate"/><published>2007-03-05T01:45:05Z</published><updated>2007-03-05T01:45:05Z</updated><author><name>Tom Cole</name><uri>https://sourceforge.net/u/tomcole/</uri></author><id>https://sourceforge.net1ae51971a832c90043a40c7632d1bfb445903050</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;GWBasic and others allow multiple statements on a line, with a separator (usually ":" or "\" characters).  These multiple statements are semantically a single statement, so you can have:&lt;/p&gt;
&lt;p&gt;100 IF X = 3 THEN PRINT "FINISHED!" : GOTO 300&lt;/p&gt;
&lt;p&gt;If the condition is true, both the PRINT and GOTO statements are executed.  This will require a couple of things in JBasic.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;1.  Statement compilation will have to be chained when there is a ":" as the next token after successful compilation; the chaining operation will locate the next verb and (recursively? serially?) invoke the next verb.  The generated statements will probably be STMT 0-type statements in the same bytecode object for the first containing Statement.&lt;/p&gt;
&lt;p&gt;2.  The line number marker in each statement used to track tokenized line numbers for RENUMBER support will have to become a list, because it will be possible to have more than one line number in a given statement.  This is probably already true with IF..THEN GOTO...ELSE GOTO.. statements anyway.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Recursion doesn't work in functions</title><link href="https://sourceforge.net/p/jbasic/bugs/2/" rel="alternate"/><published>2006-07-13T17:26:02Z</published><updated>2006-07-13T17:26:02Z</updated><author><name>Tom Cole</name><uri>https://sourceforge.net/u/tomcole/</uri></author><id>https://sourceforge.net2bc5897bf4b5050242b4d75c66a7e18f280dff5b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;A FACT() function written to calculate a factorial&lt;br /&gt;
recursively won't work - the passing/management of&lt;br /&gt;
scope for the nested call frames does not appear to&lt;br /&gt;
work properly at all.&lt;/p&gt;
&lt;p&gt;FUNCTION FACT( V )&lt;br /&gt;
// Version: 1.0&lt;br /&gt;
// Date:    Wed Jun 21 14:16:00 EDT 2006&lt;br /&gt;
// Author:  cole&lt;br /&gt;
IF V &amp;lt;= 2 THEN RETURN V&lt;br /&gt;
LET X &amp;lt; LOCAL &amp;gt; = FACT( V - 1 )&lt;br /&gt;
LET Y &amp;lt; LOCAL &amp;gt; = V * X&lt;br /&gt;
RETURN Y&lt;/p&gt;
&lt;p&gt;This gets into an infinite loop with FACT(3).&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>FILE status is overloaded with non-localizable substitutions</title><link href="https://sourceforge.net/p/jbasic/bugs/1/" rel="alternate"/><published>2006-01-22T20:30:42Z</published><updated>2006-01-22T20:30:42Z</updated><author><name>Tom Cole</name><uri>https://sourceforge.net/u/tomcole/</uri></author><id>https://sourceforge.net6274a80823bc94becbe064771283839cb6d45410</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The Status.FILE error state is overloaded.  It is a generalized prefix that &lt;br /&gt;
accepts a substitution string, which is usually where the real error is &lt;br /&gt;
defined.&lt;/p&gt;
&lt;p&gt;The Status.FILE errors should be broken down into a set of errors for the &lt;br /&gt;
various actual file conditions, such as &lt;/p&gt;
&lt;p&gt;FILESYNTAX&lt;br /&gt;
FILENOTFOUND&lt;br /&gt;
FILEREADERR&lt;br /&gt;
FILEWRITEERR&lt;/p&gt;
&lt;p&gt;or something similar.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>