Getting started

/Getting started
Getting started 2016-12-22T10:02:27+00:00

Lets get started

Box5GDown to business – your first program…

This first program will be to show you the very basics of the Small Basic Programming environment.  It’s focus is to make sure you understand how Small Basic helps you generate code and how you can output it in a ‘TextWindow’.  If you understand this then just check the ‘Syntax Rules’ pane; and do the tasks.

Load Small Basic and type the code shown below.  You don’t need to put my name at the bottom, but it is a good idea to get into the habit putting your own name at the start or end of every program.

Getting Started

My First Small Basic Program

The above shows a small simple program to get you started.  Enter the program, save it and then run it to see it work.  You should then use the ‘Program Autopsy‘ button below to make sure you understand the basic structures used in the sample.

Box5Y

Program Autopsy
 See and understand the various parts of the sample program above work.

End of Topic Tasks

The IDE

Box5P

The IDE
 Learn about the features of the Small Basic Integrated Development Environment.

Syntax Rules

Box5BSyntax are the rules that the language uses to make sure that everyone understands it.  All languages, not just programming languages have syntax rules that should be followed.  Programming syntax rules, however, are very strict.  Here they are:

    • Small Basic Code requires perfection – All keywords (names of objects, properties, methods and events), must be spelt correctly. The computer cannot understand TxtWindow as TextWindow – it just won’t work!
    • Small Basic code is, however, not case sensitive. It doesn’t mind if you use different mixtures of upper- and lower-case letters. Textwindow is the same as TEXTWINDOW, is the same as TextWindow. You are strongly advised to use the same capitalisation throughout your code – it makes it easier for you (and your teacher) to read.
    • Spaces, or ‘white space’ is ignored by the computer except where it is required to separate words. Adding extra white space can make your code easier for your to read but has no effect for the computer.
    • The ‘dot’ convention is essential to separate objects and their properties, methods and events.
    • Methods always use brackets to enclose their parameters.