FreeBasic Tutorials

If we look at the fact, we shall find that the great inventions of the age are not, with us at least, always produced in universities.

Charles Babbage

On this page you will find a list of tutorials on the FreeBasic programming language.

The full documentation for FreeBasic can be found on the FB Wiki.

FreeBasic Basics

Data Types

Numeric Data Types
String Data Types
Composite Data Types
Introduction to Pointers
Pointer Data Types
Pointers and Composite Types
Dynamic Arrays in Composite Types
Converting Numeric Data Types
Symbolic Constants


Arithmetic Operators
Bitwise Operators

Control Structures

Introduction to Control Structures
The IF Statement
The Select Case Statement

General Programming

Mathematical Functions

Object Oriented Programming

Introduction to FreeBasic Extended Types
Simulating Polymorphism

Example Programs

Hello World Testing the FreeBasic installation.
Hello World 2 Using Declare and defining a function.
Static Variables Static variables in a subroutine.
Implicit Conversion Implicit conversion of data types.
Explicit Conversion Explicit conversion of data types.
Cast and Convert Cast and data type conversion.
Int and Fix Int and Fix functions.
HiWord and LoWord HiWord and LoWord functions.
Operator Precedence Operator precedence in expressions.
Binary Numbers Binary numbers and the sign bit.
And Operator And operator and masking.
Or Operator Or operator and masking.
Not Operator Not operator.
Xor Operator Xor operator.
Eqv Operator Eqv operator and equivalence.
Shr and Shl Operators Using Shr and Shl operators to multiply and divide.
Log Function Log function example.
Basic Pointer Simple pointer example.
Pointer-to-Pointer A pointer-to-pointer example.
Function Pointer A function pointer example.
CRT QSort Function Function pointers and QSort.
CRT Character Functions Showcases the CRT character functions.
CRT Strtok Function Strtok example.