A BASIC Anywhere Machine program cannot receive keyboard input (nor produce any audio) if it does not have the "focus".
Tuesday, March 28, 2023
⛯ Making sure your program gets the "focus"
Saturday, March 25, 2023
📚 "What is Computer Programming?" starts with "What is a Computer?"
Many old BASIC programming books define "Computer" very early as part of describing programming and the BASIC programming language.
I think it is worth thinking of programming and programming languages in a broader context.
What do you think?
Take a look at the beginning of the topic What is Computer Programming? and expand the first cut of the section "What is a computer?"
Friday, March 24, 2023
🆕 Programming Reference: feature to try your own code next to code snippets
The best kind of documentation is the kind that not only allows you to run example code, but also let's you try your own code !!!
Saturday, March 11, 2023
🆕 _MAPSET and _MAPGET
A name–value pair, also called an attribute–value pair, key–value pair, or field–value pair, is a fundamental data representation in computing systems and applications. Designers often desire an open-ended data structure that allows for future extension without modifying existing code or data. In such situations, all or part of the data model may be expressed as a collection of 2-tuples in the form <attribute name, value> with each element being an attribute–value pair. Depending on the particular application and the implementation chosen by programmers, attribute names may or may not be unique.
BASIC Anywhere Machine provides a global "MAP" object for holding key-value pairs W. Each key is a unique string value to which is related some value (numeric or string) that can be repeated for other keys.
_MAPSET
Description:
The _MAPSET statement stores the value (a number or a string which may be the result of an expression) for the provided key (which may be the result of an expression.)
Syntax
_MAPSET( strExprKey, exprValue )
- strExprKey
- a string, which may be a literal value, a constant, a variable, or an expression of whatever complexity
- exprValue
- a number or a string, which may be a literal value, a constant, a variable, or an expression of whatever complexity
_MAPGET
Description:
The _MAPGET function retrieves the value for the provided key (which may be an expression resulting in a key.)
Syntax
_MAPGET( strExprKey )
- returns: the value associated with the key (numeric or string)
- however, if there is no matching key, then the return value is an empty string (i.e. "")
Friday, March 3, 2023
🆕 "?" as shorthand for PRINT
Can any BASIC implementation really be a BASIC without the ability to use "?" as an alternative to the keyword "PRINT" ?
One of my goals includes the ability too easily, with few if not zero edits, get old BASIC programs running in BASIC Anywhere Machine.
The ability to recognise "?" as meaning "PRINT" not only helps in that goal, but also feels good for anybody who did any BASIC programming during the home computer revolution.
🖥 Oriental Paintbrush Sim
This is a port and mod of a QBJS program ("Calligraphy Pro 128 Studio: Oriental paintbrush mode") by Vince. Click/touch the canva...
-
This BAM program is a port, with mods, of the GW-BASIC "CALENDAR" program by Taung-Chao Lee and Benito Navarro Mtz, as found on Fa...
-
QB64 is a performance demon. BAM, not so much. So I had to mod this program a fair bit as part of reducing the resolution of the screen. A...
-
Although BAM supports arrays, BAM does not support the REDIM statement. So, I've modified the original code to use _MAPSET and _MAPGET, ...