Wednesday, June 15, 2022

🆕 Program Throttling Property

 On April 22nd, I had modified BASIC Anywhere Machine (aka "BAM!") to stop throttling applications.

That provided a major speed boost to BAM! programs.  It did, though, make classic BASIC games like Donkey.BAS completely unplayable.

I finally got around to setting up a user interface for setting throttling properties on individual programs.

By default, programs have no throttling.   Set throttling when needed on a case by case basis.

I've provided a wide range of throttling values (from zero to ten million, in hundred thousand increments) while I evaluate different throttling values on applications.

Eventually, I might reduce the number of throttling options (i.e. increase the size of the increments) if there isn't any value in having that many options between the start and the end of the range.

Two screenshots below:






Sunday, June 5, 2022

🆕 BASIC Anywhere Machine's "Include Directive"

 I just uploaded a new version of BASIC Anywhere Machine with a more formal/traditional syntax for the include directive.

Aside, about include directives (from Wikipedia):

Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of the specified file to be inserted into the original file.

Syntax for the include directive in BAM:

<<include "File Name">>

  • The syntax requires everything in bold as-is
  • The only part that may vary is the file name parameter, provided between the double-quotes
  • BTW, BASIC Anywhere Machine is a single HTML file and otherwise does not work with files; technically, BASIC programs are stored in "tiddlers", aka wiki pages.
This allows us to split a large BASIC program into small modules that can be tested independently, and all be included into the main program.

I'm big fan of Componentization: Information, Knowledge, everything including BASIC programs.



Thursday, May 12, 2022

🆕 The "two-chracter" relational operators (<>, >=,<=) now allow spaces between the characters

To be compatible with GW-BASIC and QB64, BASIC Anywhere Machine now allows one or more spaces between the characters in two-character relational operators, for example:

a <> b and a <  > b are both valid

Wednesday, May 11, 2022

🆕 Adjustable fill colour for iframe containing the BASIC console window

 When whatever container (browser window, <div>) is resized, that will cause the iframe to get resized to whatever new 100% of the height and 100% of the width of the container.

And when the iframe resizes, the BASIC console window will also get resized, but the console will maintain scaled proportions for width and height based on whatever screen settings for the console window.

Whatever extra space exists between the iframe and the console window, that space normally gets filled with a gray colour (#aaaaaa).

Now, you can customise that colour via a BASIC program's File Properties.


The primary purpose for this feature: embedding BASIC Anywhere Machine programs in web pages (and TiddlyWiki) in way that fits the target colour-wise.  

🪲 BAM fixes issue with PSET and PRESET not accepting decimals (causing end of programs)

 During transpilation (i.e. converting a BASIC program to javascript), the process now rounds PSET and PRESET parameters to the nearest integer.

Sunday, May 8, 2022

🪲 BAM now allows blank lines between lines of code

I am really happy to have finally solved this problem.

It has existed in BASIC Anywhere Machine from day 1.

Nothing related to wwwBASIC, but rather a problem in the "wikification" process, the process of taking a BASIC program in a tiddler, and translating it into plain text that gets inserted into the dynamically created HTML page (HTML, javascript, and the BASIC program).

At the end of the process, the dynamically generated HTML page is fed into an iframe that displays the BASIC console.

It all boiled down to my misunderstanding of TiddlyWiki's "wikify" widget.

This is a huge relief to this kid.  I like loads of blank lines to make a complex program easier to understand.

Saturday, May 7, 2022

🆕 REPLACE$ function

The REPLACE$ function takes a source string resulting from an expression, searches for every occurrence of a search string resulting from an expression, and replaces every one of those occurrences with a replacement string resulting from an expression.

Syntax

REPLACE$(Source_strExpr, Search_strExpr, Replacement_strExpr )

Return Value = Modified_String

🖥 Ardi's Graph

A port and mod of a program shared by Ardi Ardi with the "BASIC Programming Language" Facebook group via this post . This program ...