Today, I'd like to introduce current status of Small Basic Online. At first, I will introduce fixed issues this year. Second, I'll tell what is the difference between Small Basic Online (SBO) and Small Basic Desktop (SBD). At last, I will show some ideas to write in SBO.
Following issues have been fixed this year. SBO issues are managed in GitHub.
There are many changes in SBO from SBD. SBO is still beta. So, some may be fixed but some will remain as the difference.
Extensions such as Kinect for Small Basic and LitDev cannot be used.
The initial value of the variable is "". But reference to the variable without initializing causes compile error in SBD, while no error in SBO.
In SBD, Not = "False = True; True = False;" could initialize the array Not, but in SBO, the variable Not simply contains the above string.
In Small Basic v1.2, the alpha value for opacity was specified as "#aarrggbb", but in SBO v1.0 it becomes "#rrggbbaa".
The following functions cannot be implemented in SBO (online). Writing in code will result in a syntax error of The library member'ObjXXX.MbrXXX' cannot be used in the online editor. Please download the desktop editor to use it..
The following features are not yet implemented in SBO v1.0. I can't press the button.
The following features are not yet implemented in SBO v1.0. Writing in code results in a syntax error of The library member'ObjXXX.MbrXXX' was available in older versions only, and has not been made available to this version yet..
SBO has only Arial (Helvetica), Consolas, Courier New (Courier), Roboto and Times New Roman (Times). Details are described here.
The following properties are now read-only in SBO v1.0. Attempting to assign a value results in a syntax error Property'ObjXXX.PrpXXX' cannot be assigned to. It is ready only..
When I made a square with Shapes.AddRectangle (100, 100), it was 100 x 100 pixels in size, including the thickness of the pen. On the other hand, when it was made with GraphicsWindow.DrawRectangle (10, 10, 100, 100), it was larger by the thickness of the pen. In SBO, the latter is unified, and if the pen thickness is 2 pixels, both will draw a square of 102 x 102 pixels.
The design of the turtle has changed. Especially the size has increased.
The turtle trails are the same as Shapes in SBD, and the one created later was displayed in the foreground, but in SBO, the turtle trails are always in front of Shapes.
Based on the above changes, I would like to explain the points about programming in the new Small Basic.
Neither GraphicsWindow.Title nor TextWindow.Title can be changed, so if you want to display the title, use Shapes.AddText, TextWindow.WriteLine, etc. to display it in the window.
Sample program XMC184-3 below has own title.
There is a concept of responsive design so that the homepage can support devices of various sizes. Since SBO cannot specify GraphicsWindow.Width or GraphicsWindow.Height and is affected by the window size of the browser, it is a good idea to adopt the idea of responsive design. Specifically, it monitors GraphicsWindow.Width and GraphicsWindow.Height so that it will be repositioned on the screen when it changes.
Following program CVF012 will run in both SBO and SBD.
This time, as far as I know, I wrote about the changes in SBO and new programming styles based on it, but I will continue testing SBO and write a lot of programs for SBO from now on, so I will update this article as needed. Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.