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.
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.
Karl Mitschke edited Revision 8. Comment: Added a table of contents
Karl Mitschke edited Revision 7. Comment: Added link to download Small Basic
lovely tapan edited Revision 6. Comment: great