Share via


Small Basic Online: Errors

This article is about errors in the Microsoft Small Basic program language, especially for Small Basic Online (SBO).  If you know other errors, please add them to this article.


Syntax Errors

Syntax errors are listed on the bottom of Small Basic editor while editing Small Basic source code.  Clicking a line of errors will show the source line in the editor.

In the editor, an exclamation mark and a red underline will appear for a syntax error.  Mouse hovering on the line will show the detail in a pop-up window.

I didn't expect to see 'number' here.

This error will occur with following sample.

Syntax Error Message

I didn't expect to see 'number' here. I was expecting the start of a new statement.

Sample Code

3 + y =  x

 

Property 'xxx' cannot be assigned to.

Following properties are read only.

  • GraphicsWindow.Height
  • GraphicsWindow.Width

Syntax Error Message

Property 'xxx' cannot be assigned to. It is ready only.

Sample Code

GraphicsWindow.Height = 428
GraphicsWindow.Width = 598

 

The library member 'xxx' cannot be used in the online editor.

Following members (properties or methods) will not be implemented to SBO.

  • File object members except File.GetSettingFilePath
  • ImageList.LoadImage() 

Syntax Error Message

The library member 'xxx' cannot be used in the online editor. Please download the desktop editor to use it.

Sample Code

url = "http://www.nonkit.com/smallbasic.files/Turtle.png"
image = ImageList.LoadImage(url)

 

The library member 'xxx' was available in older versions only.

Following members are not implemented to SBO yet.

  • all Desktop object menbers
  • all Dictionary object menbers
  • File.GetSettingsFilePath
  • all Flickr object members
  • GraphicsWindow.CanResize 
  • GraphicsWindow.GetPixel()
  • GraphicsWindow.Left  
  • GraphicsWindow.TItle
  • GraphicsWindow.Top 
  • Program.ArgumentCount
  • Program.Directory
  • Program.GetArgument()
  • TextWindow.CursorLeft
  • TextWindow.CursorTop
  • TextWindow.Hide()
  • TextWindow.Left
  • TextWindow.Pause()
  • TextWindow.PauseIfVisible()
  • TextWindow.PauseWithoutMessage()
  • TextWindow.Show()
  • TextWindow.Title
  • TextWindow.Top

Syntax Error Message

The library member 'xxx' was available in older versions only, and has not been made available to this version yet.

Sample Code

GraphicsWindow.Title = "Hello World"

 

This expression returns a result.

This error will occur with following sample.

Syntax Error Message

This expression returns a result. Did you mean to assign it to a variable?

Sample Code

x + y =  x

 

Run Time Errors

Run time errors have not found in SBO so far.

See Also

  • [[articles: Small Basic: Errors]] for Small Basic Desktop (SBD)
  • [[articles: Small Basic Online]]
  • [[articles: Wiki: Small Basic Portal]]