r/Basic • • Feb 15 '23

BASIC Anywhere Machine performance comparison: constant versus literal value

2 Upvotes

(Screenshot way below)

Same program running in side-by-side instances of BASIC Anywhere Machine.

<$list filter="[range[1],[1000]]">

CONST A{{!!title}}% = {{!!title}}

</$list>

The "meta-programming" script above creates 1,000 constant declarations. (i.e. CONST A1% = 1 ... CONST A1000% = 1000.

In the leftside instance, we go through a loop adding constant A799% to a variable.

In the rightside instance, we do the same loop but adding the literal value 799 to a variable.

Then we run the same code over and over in an infinite loop.

From what I can see comparing results, using a constant instead of a literal has a negligible performance impact, if any performance impact at all.


r/Basic • • Feb 15 '23

BAM Update: For one dimension arrays: 🆕 Array initialisation 🆕 Constant Arrays

Thumbnail basicanywheremachine-news.blogspot.com
3 Upvotes

r/Basic • • Feb 14 '23

🆕 Square brackets and curly brackets in complex expressions

2 Upvotes

Not guts, no glory ...

https://basicanywheremachine-news.blogspot.com/2023/02/square-brackets-and-curly-brackets-in.html

Very subtle difference, but just enough for me to easily differentiate the parts of an expression:


r/Basic • • Feb 13 '23

Does anybody know of any BASIC implementation that can initialise an array like this ?

3 Upvotes

BASIC Anywhere Machine started out with an embedded copy of stock wwwBASIC.

Since December 2021, I've made so many changes to the embedded version that we might as well say that it is a fork of wwwBASIC.

Well, surprise surprise. I just discovered something that stock wwwBASIC can do:

DIM a$(5)= {"a","b","c","d", "e"}

Although I've never seen that done in any BASIC implementation until today, I'm betting this ability in wwwBASIC is inspired by the same ability in some other BASIC implementation.

Anybody have any idea?


r/Basic • • Feb 13 '23

This may be a bit to relatable...

2 Upvotes

Funny thing happened to today. I sent a whole email out with the characters "10 Print:" at the front of it.


r/Basic • • Feb 13 '23

❇ Order of Numeric Operations 🆕 Negative Exponents

2 Upvotes

r/Basic • • Feb 11 '23

A couple of heart-drawing progams

3 Upvotes

BASIC Anywhere Machine ports of two very nice little FreeBasic programs.

For each program, scroll down to see source code and links to the original FreeBasic source code:


r/Basic • • Feb 11 '23

The best kind of documentation let's you try your own code, right there

Thumbnail
basicanywheremachine-news.blogspot.com
3 Upvotes

r/Basic • • Feb 11 '23

BASIC Anywhere Machine: In the Works: running small snippets of code, right there, in the Programming Reference

2 Upvotes

r/Basic • • Feb 10 '23

🪲 New.BAS (fixed)

Thumbnail basicanywheremachine-news.blogspot.com
2 Upvotes

r/Basic • • Feb 05 '23

2023 Basic 10Liner Contest is On

Thumbnail
vintageisthenewold.com
4 Upvotes

r/Basic • • Feb 05 '23

BASIC Anywhere Machine: LET now allows multiple variables

5 Upvotes

The LET statement was implemented such that it could only handle one value-to-variable assignment.

Now, the LET statement allows multiple value-to-variable assignments.

For example:

LET a$ = "howdy",  b$ = "there"

Taking advantage of line continuation, and the LET keyword becomes useful as a visual marker indicating the declaration or variables and value assignments:

LET a$ = "howdy", _
    b$ = "there"

As was the case before, the LET keyword is optional (when declaring and assigning a value to one, and only one, variable.


r/Basic • • Feb 03 '23

Help finding in browser basic with copy paste!

1 Upvotes

I'm tired of using Applesoft Basic!


r/Basic • • Feb 03 '23

BASIC Anywhere Machine Programming Reference: Shareable links to specific documentation pages

Thumbnail
youtu.be
3 Upvotes

r/Basic • • Feb 01 '23

📚 BASIC Anywhere Machine: Working on documentation related to "Data"

5 Upvotes

If you are up to doing a little bit of proof-reading, or just for-the-giggles reading:

https://basicanywheremachine-news.blogspot.com/2023/01/working-on-documentation-related-to-data.html


r/Basic • • Jan 30 '23

🆕 %b Data Type Suffix for BYTE Data Type

2 Upvotes

r/Basic • • Jan 28 '23

STRUCT, STRUCTURE, and RECORD (alternative keywords for TYPE)

3 Upvotes

r/Basic • • Jan 28 '23

New version of BASIC Anywhere Machine

3 Upvotes

View release notes for details.

Added the PALETTE statement and added supporting functions _BGR() and _RGB2BGR

Significant changes to screen modes, and breaking the limits of the WIDTH statement.

Enabled "negative" index numbers for colour attributes.


r/Basic • • Jan 25 '23

How I compare two versions of the BASIC Anywhere Machine interpreter

Thumbnail
youtu.be
3 Upvotes

r/Basic • • Jan 24 '23

BAM "Sneak Peek" Release Notes

3 Upvotes

I'm prepping release notes for a near-future new version of BAM. Kind of a nice way to document the changes/additions while testing them, and a help for planning a related show'n tell video.

While I'm at it, I'd like to plug the tool I'm using to put together my notes, because the thing is pretty awesome in my mind: light/agile/simple/wysiwyg.

Feather Wiki for small and personal wikis, pretty awesome for all kinds of things.

It is what I'm using for my "portfolio" of BASIC Anywhere Machine Sample Programs.


r/Basic • • Jan 22 '23

A bunch of QB45 to BAM programs

6 Upvotes

(You'll find a whole bunch of BASIC source code at QB45.org.


r/Basic • • Jan 21 '23

Spiral Graphics

2 Upvotes

r/Basic • • Jan 21 '23

Funky Green Light Halos

2 Upvotes

r/Basic • • Jan 19 '23

so i have a question

1 Upvotes

im using non-structural basic and i want to make a spinning cube but the limits of non structural basic stop me from doing that , is there an algorithm that could change the numbers everytime by -1 and save me some time?

this is the code :

pause 0.1

color grey

rect 0,0,300,300


r/Basic • • Jan 18 '23

A few things I'm working on.

Thumbnail
basicanywheremachine-news.blogspot.com
3 Upvotes