Share via


Small Basic Tutorial: Creating Your First Program

Today we have a guest blogger: Noah Buscher! Check out Noah's first tutorial... about your first Small Basic program.

 

Small Basic is a .NET language created by Microsoft. It allows the beginner programmer to get started creating programs right away, and does not confuse the beginner with the numerous controls found in Visual Basic Express or Visual Studio. Officially, Small Basic is just a toned-down version of Visual Basic.NET. This means that once you are done learning Small Basic, you can easily learn Visual Basic. Let’s get started on your first program in Small Basic.

 
Step 1: Set Up Small Basic

Before you begin, be sure you have Small Basic downloaded and installed. After you are done installing, open up Small Basic, and you will see an editor like this:

 

 

This window is called the IDE, or Integrated Development Environment. This is where you will write, debug, and compile your code. This also includes a great feature called IntelliSense. This allows you to write code fast and easy. Please look at the image below to get an idea of what it looks like:

 

 

To use IntelliSense, just start typing! Take a look at all the commands available to get an idea of what Small Basic is capable of. For our first program, we are going to make a program that asks the user for a number, multiplies it by five, and displays the answer to them. Type:

 
TextWindow.WriteLine("What is the Number You Want to Multiply?")
userInput = TextWindow.ReadNumber()
answer = userInput * 5
TextWindow.WriteLine("The Answer is " + answer)

This program asks for the number to multiply, and stores the input in the variable userInput. Then it multiplies the number by five and stores that answer in the variable answer. Finally, it shows a message that displays the answer to the user.

 

Pretty cool, right? Try to modify the program to multiply the number by five and then add 5 to that answer.

 

Tutorial provided by Noah Buscher and Joman Mied.

Comments

  • Anonymous
    November 11, 2012
    The comment has been removed

  • Anonymous
    November 13, 2012
    I would also like to credit in large part, Joman Mied. He wrote this article with me.

  • Anonymous
    November 18, 2012
    Hello

  • Anonymous
    November 20, 2012
    Noah, I added the credit to Joman. Thanks!

  • Anonymous
    November 20, 2012
    Typo Police, I fixed that typo. =^) Thanks!

  • Anonymous
    November 23, 2012
    Noah, can we also publish this as a TNWiki article? Thanks!

  • Anonymous
    December 07, 2012
    Sure! Sorry for the late reply...

  • Anonymous
    December 09, 2012
    Noah, do you want to do that, or shall I? Thanks!

  • Anonymous
    February 20, 2013
    I, personally, am proud of this tutorial :) Congrats, Noah!

  • Anonymous
    February 20, 2013
    Thank you, Joman, for your great contribution! Let me know if you ever want to do more tutorials!

  • Anonymous
    February 24, 2013
    small basic is best for lrning kids

  • Anonymous
    April 02, 2014
    how do we create a program which tells jokes and pressing enter

  • Anonymous
    April 06, 2014
    Shahnawaz, Take a pass on it yourself, using the existing tutorials. Check out the Curriculum: social.technet.microsoft.com/.../16302.small-basic-curriculum-lesson-1-1-introduction.aspx And then go post in the forum when you're stuck: social.msdn.microsoft.com/.../threads Thanks!

  • Anonymous
    August 02, 2015
    Hmm. The images aren't showing for me.