Tuesday, November 15, 2022
Friday, November 11, 2022
đ _INPUTBOX$ and _KEYCLEAR and ❇_PROMPT
Added the _INPUTBOX$ function and the _KEYCLEAR statement.
Modified the _PROMPT function. (The second parameter is now optional.)
The _INPUTBOX$ function displays a prompt in a dialog box, waits for the user to input text or click a button, and returns a string containing the contents of the text box. The returned string is an empty string ("") if the user cancelled.
Syntax
_INPUTBOX$ (title$, message$)
_INPUTBOX$ (title$, message$, defaultValue)
Return value: a string
_KEYCLEAR clears the keyboard input buffer.
Syntax
_KEYCLEAR
The _PROMPT "Popup Box" function is used in a program to receive 1 string of characters via the web browser's standard prompt dialog for user input of some text. The running program will wait until the user either submits the text or cancels the dialog (returning no text.)
Syntax
_PROMPT (message)
_PROMPT (message, defaultValue)
Return value: a string
- message is a simple literal string or a string expression of any complexity
- defaultValue is a simple literal string or a string expression of any complexity
Tuesday, November 8, 2022
What is BASIC Anywhere Machine?
I've had a hard time explaining it ever since I first started thinking about it. This is my latest attempt.
BASIC Anywhere Machine is becoming:
Imagine Wikipedia (as in the software behind it and everything that makes it work), all existing in one self-editing and self-saving HTML file.
Imagine that one file containing:
- everything needed for BASIC programming
- an interpreter
- an IDE
- all of the programming tools
- all of the programs
- and all of the data for those programs
- and everything to support all processes and artefacts for
- project management
- requirements management and traceability
- source code management
- all things from end to end in a software development process
And all you need along with that file is a web browser:
- offline. online. all fine.
- the device doesn't matter.
- the operating system doesn't matter.
Now, forget about Wikipedia.
BASIC Anywhere Machine is a TiddlyWiki instance. Because TiddlyWiki has the goods (goodies) to create just about anything. Don't let the cutesy name fool you. The thing is a powerhouse.
Saturday, November 5, 2022
❇ POINT: Added syntax option to get current graphics X or Y coordinate.
EDIT: Also Fixed: Issue with POINT(x,y) not working in "rgba" SCREEN modes. (Details)
Friday, November 4, 2022
𪲠PRESET when no color is specified
In wwwBASIC, PRESET does the exact same as PSET when no color is specified: they both set the pixel color to the foreground color.
In BAM, PRESET now sets the pixel color, when a color is not specified, to the background color.
Thursday, November 3, 2022
Mouse Input functions: đ _MOUSEX, _MOUSEY, _MOUSEBUTTON, _MOUSEWHEEL ❇ GETMOUSE
The _MOUSEX function returns the current Y coordinate of the mouse pointer.
The _MOUSEY function returns the current Y coordinate of the mouse pointer.
The _MOUSEBUTTON function returns a 1 if the mouse button is currently pressed, and returns a 0 if the mouse button is currently not pressed.
The _MOUSEWHEEL function returns the accumulation of wheel decrements and increments that have been done with the mouse wheel since the last call to the function. (i.e a call to the function resets the number of wheel increments to zero.)
Pushing the wheel forward will decrement the number. Pulling the wheel backward will increment the number.
GETMOUSE
Although the syntax was setup in wwwBASIC to accommodate a mouse wheel parameter, there was never any code setup in the interpreter to get values for the mouse wheel.
The version of wwwBASIC in BASIC Anywhere Machine now gets the mousewheel value.
NOTE that GETMOUSE's retrieval of mousewheel value differs a bit with the _MOUSEWHEEL function.
Syntax
GETMOUSE x%, y%GETMOUSE x%, y%, w%GETMOUSE x%, y%, w%, b%
- x% = horizontal position
- y% = vertical position
- w% = accumulation of wheel increments and decrements since the last call to the function đ
- b% = button
❇ Documentation redesign: Enhancements to wwwBASIC page
Check out the page, changed from a long list to a table.
đĽ 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...