Saturday, June 18, 2022

🪲 Get (graphics statement): specification of rectangle coordinates

 In wwwBASIC, the GET statement's rectangle coordinates must be specified as top-left and bottom right corners of the rectangle in that specific order.

The same corners specified in reverse order, or the opposite corners specified in any order, all will cause a program to fail without errors.

The version of wwwBASIC in the latest version of BAM modified the GET statement so any opposite corners in any order can be specified.  So any of the following will work:

  • top-left corner and bottom-right corner;
  • bottom-right corner and top-left corner;
  • top-right corner and bottom-left corner;
  • bottom-left corner and top-right corner

By the way, syntax for the GET graphics statement, as per many (most? all?) BASIC implementations:

GET (x1,y1) - (x2,y2), array_name

⚙ File Properties Viewer: user interface tweaks

In the latest version of BASIC Anywhere Machine:




Friday, June 17, 2022

🪲 Fixed issue: multiple blank lines causing program to become unresponsive

 Just fixed a weird issue with multiple multiple blank lines causing programs to either become non-responsive or, more likely, not run at all.


The problem seemed to happen when there were 2, 5, 8, 11, 14, or more (increments of three) blank lines between two lines of code and/or comments.


Caused by some "wikification" process code I had inserted trying to resolve an issue with wrong line numbers getting reported upon errors in BASIC syntax/etc.

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.  

🖥 Circular Sinusoidal Waves with DRAW and SIN

Run the program View the source code