Tuesday, May 7, 2024
đĽ Auto Biaxial Symmetry Graphing Personalizer
Monday, May 6, 2024
đĽ Animated Recursion Demo
A little program to demonstrate a recursive subroutine.
It also demonstrated the use of DRAW with the TA (angle) command to help draw the outline "dotted" circles by positioning the pen to draw those points (using CIRCLE to create some thick points, because PSET pixels aren't quite visible enough for these aging eyeballs.
To make things interesting, the drawing is animated and uses a new random colour for each recursion (in the hopes "seeing" what the code is doing.
The program runs in an endless loop, retracing the previous drawing with new random colours..
Friday, May 3, 2024
đ FUNCTION (and SUB): variable arguments, by default, are "passed by reference"
- Preamble
- A primer on "call-by-reference" vs "call-by-value"
- BAM HOWTO
Preamble
In function and subroutine calls,
a variable as an argument
is always "called by reference"
and never "called by value".
A primer on "pass-by-reference" vs "pass-by-value"
Call by reference (or pass by reference) is an evaluation strategy where a parameter is bound to an implicit reference to the variable used as argument, rather than a copy of its value. This typically means that the function can modify (i.e., assign to) the variable used as argument—something that will be seen by its caller.
In call by value (or pass by value), the evaluated value of the argument expression is bound to the corresponding variable in the function (frequently by copying the value into a new memory region). If the function or procedure is able to assign values to its parameters, only its local variable is assigned—that is, anything passed into a function call is unchanged in the caller's scope when the function returns.
BAM HOWTO
Call by reference
DIM a$ = "Howdy"FUNCTION hello$( p$ )p$ = p$ + " there"hello$ = p$END FUNCTIONPRINT "a$: " + a$PRINT "result of hello$( a$ ): " + hello$( a$ )PRINT "a$: " + a$
Call by value
DIM a$ = "Howdy"FUNCTION hello$( p$ )p$ = p$ + " there"hello$ = p$END FUNCTIONPRINT "a$: " + a$PRINT "result of hello$( a$ ): " + hello$( ( a$ ) )PRINT "a$: " + a$
Saturday, April 20, 2024
đĽ Arabesque Trig Drawing
This BAM program is a port and mod of a Small Visual Basic program.
I've modified the program to create an endless loop of new images, and I've made some previously fixed parameters a bit dynamic by setting them to random values for each new drawing. (see source code for more details.)
Pause the program (at pretty much any time) by clicking/touching the program's output screen.
Saturday, April 13, 2024
đ§ Next version of BAM in the works
Monday, April 8, 2024
đĽ Coin Tail
This is a port and mod of a BBC BASIC program that is a port and mod of a Commodore PLUS/4 program.
(BBC BASIC program by Richard Russell. Commodore PLUS/4 program by Georgios Patsos. See source code for more info.)
Sunday, April 7, 2024
đĽ DRAW Spiral Graphing Demo
This program runs some DRAW statements in a series of inline loops within a larger endless loop, each inline loop transitioning from one value to another parameter within each loop.
Something like that. I'm not sure how to word that coherently.
The animation demonstrates a large possible number of images that can be created using DRAW in a "spirograph" kind of way.
You'll know that the program has restarted from the beginning when the graphing colour changes.
Please note: this program was created with the development version of BASIC Anywhere Machine (to test the recently added fractional angle values for the DRAW statements TA command.)
đĽ 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 ...
-
Drawing regular polygons is pretty easy when using DRAW to generate the points of the polygon, using specified coordinates for the center of...
-
This program is a port and mod of Steve Justice's program presented in the "Fractals in Focus" article found in the May 1985 i...
-
This program by Charlie Veniot is a port and mod of Ian Witham's C64 program found in this YouTube video. New colours are randomly proje...