Small Basic

BASIC (Beginners All-Purpose Symbolic Instruction Code) was one of the first computer programming languages to be created, nearly 50 years ago, and it is still one of the most popular. There are many flavours of Basic and, confusingly, two of them have very similar names: 'SmallBasic' and 'Small Basic'). The version referred to on this site is Microsoft Small Basic. Small Basic is a textual programming language for learners based on the Microsoft .NET framework. Small Basic runs only on Windows computers.

Quoting from this page:

Microsoft Small Basic puts the "fun" back into computer programming. With a friendly development environment that is very easy to master, it eases both kids and adults into the world of programming. Small Basic combines a friendly environment with a very simple language and a rich and engaging set of libraries to make your programs and games pop. In a matter of few lines of code, you will be well on your way to creating your very own game! With a new and revolutionary IntelliSense®, Small Basic makes writing code a breeze. Share your programs with your friends; let them import your published programs and run them on their computer. Using the Silverlight player, you can even post your games on your blogs and websites for them to play your creations in the browser. Learn the programming concepts starting with the fundamentals and move your way up. Small Basic is based on .NET and what you learn here could be easily applied to other .NET programming languages like Visual Basic.

Downloading Small Basic from this page and installing it on your Windows PC should be straightforward. Downloading is free of charge. If you have Windows XP or previous you need Small Basic 1.0 and .NET 3.5 or later. If you have Windows 7 or later you need Small Basic 1.2 and .Net 4.5 or later. You may well have the necessary version of .NET installed even if you are not aware of it. .NET 4.5 is pre-installed on Windows 8 and later.

The main Small Basic site is at smallbasic.com and documentation is available HERE. Check out the Small Basic Getting Started Guide (available in 20 languages), this very good PDF tutorial and a detailed and helpful WIKI. A very good online course on Small Basic for secondary schools is available HERE.

Be aware that when you run a program in Small Basic (i.e. in PC mode), multiple other files will be created in the same folder that the Small Basic (.SB) program file was saved in. These additional files include an EXE (executable) file, a PDB file (a debugging file) and several XML and DLL files. Why such an annoying proliferation of files? it's partly so that you then have the possibility of giving that complete set of files to anyone who does not have Small Basic on their PC and they will still be able to run your program by executing the EXE file (as long as they have .NET on their PC, which is usually the case). With so many files being created there is risk that the folder containing your Small Basic programs will soon be a big mess... unless you get into the sensible habit of creating a new folder for each new Small Basic program that you create.

Debugging in Small Basic is simple but helpful. The image below shows what happened when I tried to run this program that contains an error. The error is that the third argument of the Motor.Move function (the angle through which the motors should turn) has been omitted. Small Basic has given me a corresponding warning and has indicated that the function that generated the error is at line 1, character 7. If you double-click on the error message then the cursor will immediately be placed at the given location. The image below also indicates (in the bottom-right corner) that the current location of the cursor is at line 1, character 23.

A nice feature of Small Basic is that if you right-click the programming window you can then 'format the program' which corrects the indentation of the code, making the code more legible and making certain programming errors more obvious.

Click HERE to read more about the EV3 extension for Small Basic and learn how to install it on your computer free of charge.