Small Basic: Did You Know?

Small Basic: Did You Know?

Here are some tips to remember while programming with Small Basic.  Feel free to add more as you figure 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.
  • 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 such as AAA000-0 if you Import a program, edit it, and 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.

Leave a Comment
  • Please add 6 and 8 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
  • Nonki Takahashi edited Revision 5. Comment: added obsolete operations, code system, and known issues

  • Ed Price - MSFT edited Revision 4. Comment: Title casing. Great article!

  • Nonki Takahashi edited Revision 1. Comment: changed we as you

  • Nonki Takahashi edited Original. Comment: image size

Page 1 of 1 (4 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Page 1 of 1 (6 items)