Hi All,
Fun QBJS update for everyone. There is a new beta release (v.0.2.1) out to take for a spin!
You can try it out online here:
https://boxgm.itch.io/qbjsWant to download it and run it locally? Just go to the releases page on github (
https://github.com/boxgaming/qbjs/releases) and download the qbjs.zip file. Unzip it to your preferred location and then just launch the index.html file.
This update has a number of fixes and enhancements:
Fixes* Keywords that perform a system wait or sleep (_Delay, _Limit, Sleep) do not wait correctly when called from a Sub
* Keywords that perform a system wait (_Delay, _Limit, Sleep, Print, Input, Line Input) error when called from a Function
* Array declaration (Dim/ReDim)
* (x To y) syntax not supported at present (e.g. Dim myArray(0 To 10))
* Multi-dimensional arrays are not initialized correctly unless using the "Dim As Type" format (e.g. Dim As Integer myArray(10, 20))
* Improved support for standard key mappings for InKey$, _KeyDown and _KeyHit methods
* Single-line If/Then/Else statements are not converted correctly
* Single-line If/Then statements with ":" to combine additional lines do not work correctly
Enhancements* Implement color table for the various screen modes so the simple indexed color numbers can be used in addition to colors defined with _RGB(32)
* Add support for QB64 image handling methods (_NewImage, _LoadImage, _PutImage, _CopyImage, _FreeImage)
* Improved runtime error reporting
You can check out the current list of supported keywords here:
Supported KeywordsKeyboard Event Handling UpdatesSupport for standard QBasic/QB64 keyboard keywords have been greatly improved. The following two examples should run pretty similar in native QB64 vs. QBJS:
Classic Indexed Color SupportQBJS now supports the original simple indexed 256-color palette. Keywords that take colors as parameter will now accept the simple indexed color numbers as well as colors created with the _RGB* methods.
View in QBJSQB64 Image KeywordsQBJS now supports most of the QB64 image keywords. Here are some examples to try out:
Note: If you find that previous link examples in this thread are not working you can simply replace the first part of the link with the current internal QBJS URL:
https://v6p9d9t4.ssl.hwcdn.net/html/5429488/index.html?qbcode=
As always I value any and all feedback!