Small Basic: Did You Know?
Here are some tips to remember while programming with Small Basic. Feel free to add more as you figure them out.
Small Basic IDE
- Double clicking on the compiler errors will take you to the actual error.
- You can zoom the text in the editor by holding control and using the mouse wheel. You can do the same by holding Control, Shift and hitting + or -.
- You can resize the Help Pane on the right. Just move the mouse to the left edge of the pane and the cursor will change to indicate it's resizable.
- You can make the Intellisense Window translucent by holding down the Control key. Useful to see the text underneath.
http://smallbasic.com/drop/translucent.jpg - If you forget the syntax while entering an expression, click back on the Operation name preceding the opening bracket. This will bring the Help back up for that command. You can then click where you want to edit and continue.
- You can get a program ID with revision number after the dash (such as AAA000-0). Import a program, edit it, and then Publish it.
Small Basic Syntax
- Color (Graphics)
You can use such colors "#FFF" or "#80FFFFFF" in GraphicsWindow. The first one means "#rgb" and is same as "#FFFFFF". The second one means "#aarrggbb". "aa" is transparency (alpha blending). But at the point using alpha, GetPixel returns blended color with "Black". - Obsolete Operations (Array, TextWindow)
Operations Array.GetValue, Array.SetValue, Array.RemoveValue, TextWindow.ReadKey are obsolete. There are alternative way to do for array as below:
arry[index] = value ' Array.SetValue(arry, index, value)
value = arry[index] ' value = Array.GetValue(arry, index)
arry[index] = "" ' Array.RemoveValue(arry, index) - Code System (Text)
Code system of Small Basic is UTF-8. - Known Issues (Shapes, Event, Turtle, ...)
- Shapes.GetOpacity() always shows cast error.
- Shapes.AddText() at the top of program shows exception thrown by target.
- Event subroutines should be after they are registered.
- After GraphicsWindow.Clear() or Turtle.Hide(), the turtle disappears at all.
- Other known issues about Small Basic v1.0 is here.