Getting started

Dear visitor,

this page attempts to sum up everything you need to get yourself started with thinBasic in a matter of minutes.

Step 1: Download thinBasic

ThinBASIC can be downloaded free of charge in our Downloads section.
We try to keep the installer small, and it does not require internet connection once saved to your PC.

Step 2: Write your first program

The default installation already contains the IDE (Integrated Development Environment).
It is called thinAIR and you can find its executable in \thinAir directory of your thinBasic installation.

Once you start thinAir, choose File/New, press Ctrl+N or click the New thinBasic script icon
All these options will open an dialog, where you can choose existing code template or start from scratch.

For today, just click New button to open new, empty script.

ThinBASIC scripts are simple text files. We will want to write simple console program for a start, one that will learn your name and greet you.

Type in the following:

This tells thinBasic that you want to use functionality from thinBasic console module. Modules are libraries of functions and types, which add specific functionality to the language.

Then, we need to store your name to some variable. It will be a text, and for storing text a String data type is the most appropriate one.

Now we have a place to store data to, let’s ask user for some input.

…and read it to our variable.

console_readLine is a function, which lets user enter some data and confirm it with enter.
If you want to learn more about this function, simply move your cursor on Console_ReadLine and press F1.
This will take you to context sensitive help file, which again comes with default thinBasic installation.

Now it’s time to print something. You can do it simply as:

And last but not least, we will add:

…which makes sure your console window will not close immediately, but waits for keypress of any key. That is, any key from your keyboard, while legends say otherways, there is no “any key”.

Challenge of the first day:Try to use F1 key to find shorter aliases for the Console_Write and Console_WaitKey functions.

Step 3: Run your first program

Now your code in thinAir should look like the following:

To execute it, choose Script/Execute script from the menu, or, as we, old veterans, press F5 to immediately execute it.

Step 4: Get inspired

If browsing through help file isn’t your cup of tea, you may get a solid idea about the variety of tasks thinBASIC can achieve by peeking at the SampleScripts subdirectory of your thinBasic installation.

Step 5: Enjoy the ride

Now that you have learned how to write scripts, browse help file and launch your creations, you can try to create much more complex (and useful) applications.

Please explore the options from the Learn menu and don’t forget to join our forums.

There are many people, including authors of the language as well, who are willing to help you on your journey to become a great thinBasic programmer!