Glossary
Brief definitions and explanations for words and phrases used in the FreeBASIC manual.
Index: A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z
A
abstract member function
A member function without body that must be overridden by a member function of a type more derived than the type it was declared in. See `Abstract (Member)`.
access rights
The level of access associated with `Type` or `Class` members. Public members are accessible to any code; protected members are accessible to member functions and any derived `Type` or `Class` member functions; private members are accessible only to member functions of that `Type` or `Class`. By default, `Type` members have public access rights, while `Class` members are private.
any pointer
A variable or expression that points to a memory address where it is not known, at least from the compiler's point of view, what type of data is stored at that address. In C this would be the same as a void pointer or (void *). See `Ptr`.
archive
An archive is a group or files or a single file packed into a container format and usually compressed before or afterward. Typical container formats are GNU Tar and Zip. Typical compression formats are Gzip and Zip.
argument
Data that is passed to a procedure. The procedure refers to this data using the parameter(s) in its parameter list.
argument passing convention
The method in which arguments are passed to procedures, being either `By Reference` or `By Value`. See Passing Arguments to Procedures.
array (container)
A collection of data whose elements are stored contiguously in memory (one after the other, in increasing order). Because of this, an array offers random-access to its elements (any element can be accessed at any time). Insertion or removal of elements anywhere but at the back of the container requires that those elements that follow be relocated, so a linked-list is typically preferred when insertion or removal needs to be efficient.
assembler
A component in the tool chain for translating source code in to executable programs. The assembler converts the low level assembly instruction mnemonics emitted by the compiler to object code.
assignment
Assignment is one of the fundamental operations of computing. All it means is copying a value into the memory location pointed at by a variable. The value might be a literal, another variable, or the result of some expression. For an instance of a `Type` or `Class`, this involves calling one of its assignment operators. Not to be confused with initialization.
automatic storage
Refers to storage on the call stack. Local procedure variables, objects and arrays with automatic storage are allocated when the procedure is called, initialized when defined, destroyed (in the case of objects) when leaving the scope they're declared in and deallocated when returning from the procedure.
automatic variable/object/array
A variable, object or array with automatic storage.
Back to top
B
byref
`ByRef` specifies passing arguments to procedures by reference. Arguments passed by reference can be modified by the procedure and the changes seen by the caller.
byval
`ByVal` specifies passing arguments to procedures by value. Procedures receive a copy of the argument passed. With `Type` or `Class` instances, this involves instantiating temporary objects by calling their copy constructor. These temporaries are destroyed upon procedure exit.
binaries
Binaries are the end result of source code. Binaries include executable files (.exe on windows), static library files (.a), dynamic library files (.dll on windows, .so on Linux), and relocatable object files. (.o)
.BSS section
The part of the executable program that will contain zero bytes only when the program starts. Since all of the bytes are zero, the final size of the executable can often be reduced by placing uninitialized data, or zero initialized data in this section.
buffer
A region of memory that allows data to be saved or manipulated before being copied somewhere else. In a communications device this may hold incoming or outgoing data yet to be processed. In graphics, a buffer may contain an image before being copied to the screen.
Back to top
C
call back
A control mechanism where a caller lets a procedure call another procedure (the call back) provided by the caller typically through a function pointer.
call stack
A chunk of memory reserved for a process or thread that is used as a stack for storing various information needed by procedures when they are called. Among the information stored on the call stack are all of the local automatic variables, objects and array data and usually whatever parameters are passed to the procedure. These items are allocated (pushed onto the call stack) when the procedure is called and deallocated (popped from the call stack) when the procedure returns, either by the caller or the callee, depending on the calling convention used. The initial and maximum sizes of this reserved memory vary by platform.
caller
A misnomer used to refer to the point in code in which a procedure is called.
cast
A cast operation changes one data type to another using specified rules. A `Type` structure can implement a custom `Cast` for any intrinsic data type, and/or other TYPEs, See `Cast`.
code block
Several lines of source code grouped together all sharing at least one common scope. For example a procedure's code block will be all the lines of code between `Sub` and `End Sub`.
com port
A short name for serial communications port. A program can communicate with an external device, such as modem or another computer through a com port (nowadays the good old com ports are deprecated in favor of USB). See `Open Com`.
compiler
A compiler is a computer program which takes source code and transforms it into machine or object code.
compiler directives
These are instructions included in the text of the program that affect the way the compiler behaves. For instance the compiler might be directed to include one section of code or another of depending on the target operating system.
compound statement
A statement composed one or more additional statements. Typically, a compound statement has a beginning (opening statement), a middle (a statement block) and an end (closing or ending statement), while some have additional parts. Examples of compound statements would be `If` and `Function`.
constant
A symbol that retains a consistent value throughout the execution of the program. See `Const`.
constructor (module)
A special type of module-level procedure that is automatically called prior to the module-level code flow. See `Constructor (Module)`.
constructor (TYPE or CLASS)
A special member function of a `Type` or `Class` that is called when an object is instantiated.
contravariance (TYPE or CLASS)
A typing rule for `Type` or `Class` that allows you to use a more generic (less derived) type than the one originally specified.
covariance (TYPE or CLASS)
A typing rule for `Type` or `Class` that allows you to use a less generic (more derived) type than the one originally specified.
CVS
Concurrent Versions System. The file manager implemented at Sourceforge where sources are stored, it keeps the history of the changes introduced by the developers. Used by FB in the past. (see also SVN and GIT)
Back to top
D
.DATA section
The part of the executable program that will data that can be changed while to program is running.
debugger
A program that allows controlled execution of compiled code. The values of variables can be tracked, execution can be paused, stepped or accelerated, etc. A debugger is typically used to help find the source of programmer errors in source code, called 'bugs'.
declaration
A source code statement that introduces a symbol, constant, variable, procedure, data type, or similar, to the compiler but not necessarily allocate any space for it. See `Dim`, `Declare`, `Extern`, `Type`.
definition
A source code statement (or statements) that allocates space for data or code. For example, `Sub` defines a procedure by allocating space for the program code it will contain. Some statements can be both a declaration and a definition. For example, `Dim` both declares and defines a variable.
dereference
The act of accessing (in read and in write) a variable stored at a given address. See `Operator * (Valueof)`, `Pointers`.
descriptor
Refers to the internal data structure used by the compiler and runtime library for managing variable length strings and arrays.
destroy (TYPE or CLASS)
The act of deconstructing and deallocating memory for an object instance. When an object is destroyed, its destructor is called. This happens automatically when an object goes out of scope, or when `Delete (Statement)` is called with a pointer to an object.
destructor (module)
A special type of module-level procedure that is automatically called at program termination. See `Destructor (Module)`.
destructor (TYPE or CLASS)
A special member function of a `Type` or `Class` that is called when an object is destroyed.
dll
Shorthand for dynamically linked library.
DPMI
A method / standard allowing to execute protected mode code (mostly also 32-bit) on a 16-bit real mode DOS kernel. Affects only DOS version of FreeBASIC. See also `DOS related FAQ`
DJGPP
A complete 32-bit C/C++ development system for Intel 80386 (and higher) PCs running DOS and includes ports of many GNU development utilities.
dynamically linked library
A file containing executable code that is loaded by another application when it is started. Also referred to as a dll or shared library. See `Shared Libraries (DLLs)`.
Back to top
E
enum
A data type restricted to a sequence of named values given in a particular order. See `Enum`.
executable
A binary file that can be run. It consists of libraries and object files bound together by the linker.
exit sub/function
When called inside a procedure, leaves the procedure and returns control to the calling program.
expression
An instruction to execute a statement that will evaluate/return a value.
Back to top
F
field
Commonly refers to a data member in a `Type` or `Class`.
file number
An integer associated with an open file or device as given in `Open`. All subsequent operations on the opened file or device must use the same file number.
format string
A sequence of characters that controls how data should be presented. See `Format`, `Print Using`.
function
A procedure defined using `Function`, optionally taking parameters and returning a value.
function pointer
A variable containing the address of a function. The address (function) to which the variable points can be changed while the program is running allowing for dynamic program flow, such as call back functions.
Back to top
G
get/put buffer
See: Image Buffer. An image buffer in FreeBASIC's native format.
GIT
The file manager implemented at Sourceforge where sources are stored, it keeps the history of the changes introduced by the developers. Used by FB now. (see also CVS , SVN and GIT).
global variable
A variable that is visible to all procedures within a module, across multiple modules, or both. See `Common` and `Extern`.
GNU
A mass collaboration project with the primary goal to provide a free and non-proprietary Unix-like operating system.
GPL
Short hand for GNU General Public License: a license for software and other kinds of works. Open source, obligates the user to keep the project open source and under the GPL.
graphics primitive
A graphics primitive is another term for common shapes like circles and rectangles.
Back to top
H
hash table
A data structure that associates keys with values allowing for efficient look-up of values based on a given key.
header
When talking about a collection of data, this is generally the first part of that data that describes the rest. When talking about (header) files, this refers to an include file. In FreeBASIC the file extension '.bi' is usually used.
heap
The area of memory (free store) provided by the runtime library (and operating system) from which the program can dynamically allocate memory. See `Allocate`.
Back to top
I
image buffer
A collection of data used to describe an image, containing such information as width, height, color depth and pixel data.
include file
A kind of source file that typically contains type definitions and declarations for variables and procedures that one or more other source files refer to. In general, these files provide a public interface to some module or modules, although a file that is #included can contain any text whatsoever.
inheritance (TYPE or CLASS)
Inheritance is when deriving a type from a base type, by using the `Extends` declaration. Members of the base type become members of the derived type. `Private` members of a base type are never directly accessible from a derived type, but can be accessed through calls to the `Public` and `Protected` members of the base type.
initialization
The act of giving a variable a value at the point of its creation. For object instances, this involves calling one of its constructors. Not to be confused with assignment, which gives an already existing variable another value.
instance
An instantiated object of a `Type` or `Class`.
instantiate
The act of creating an object of a `Type` or `Class`, either directly with `Dim`, or indirectly by, for example, passing an object to a procedure by value.
invariance (TYPE or CLASS)
A typing rule for `Type` or `Class` that requires you to use exactly the same type as the one originally specified.
Back to top
J
Back to top
K
Back to top
L
library
Compiled code stored in a single file that can be used when making other programs. A library typically has one or more headers (or include files) to provide all the needed declarations for using the library.
linked list (container)
A collection of data whose elements are typically stored on the heap. The linked list's elements store the addresses of their adjacent elements, and so only sequential access (an element is accessed by following the links from adjacent elements) is possible. This scheme does provide constant-time insertion of elements anywhere into the container, however, and because of this is often preferred over the array.
linker
A program which combines multiple modules and libraries into a single executable which can be loaded into the computer's memory and followed by the computer. FreeBASIC uses the LD linker. Linkers are the most common, but not the only way to produce executables.
LGPL
Shorthand for GNU Lesser General Public License. Like the GNU GPL, but more permissive allowing non-(L)GPL'd works to be statically linked to the LGPL'd work, provided that the new work can have the LGPL'd portion relinked or replaced.
LHS
Acronym for "Left Hand Side".
local variable
A variable that is visible only within the scope in which it is declared, and that is destroyed when program execution leaves that scope.
lock
A synchronization mechanism such that only one thread or process can have access to a shared object, for example a global variable, a device, or a file.
Back to top
M
member
A data field, procedure, enumeration, type alias or anything else declared within a `Type` or `Class` definition.
member data
Variables associated with a `Type` or `Class`. Member data can be static or non-static.
member function
A procedure associated with a `Type` or `Class`. Member functions have full access rights to the members of its type or class, and can be static or non-static.
method
See member function.
module
A source file in its entirety, including any `include files` that may be present as well. Typically, a module is a logical unit of code, containing parts of a program that relate to one another. For example, if making a game, one may separate the procedures needed for error logging from the procedures that control graphics into their own modules.
Back to top
N
non-static member data
Member data that each instance of a `Type` or `Class` gets their own copy of.
non-static member function
A member function that has an implicit `This` reference as an argument.
null
A constant usually associated with pointers denoting a 'nothing' value. This value is typically an integer '0' (zero) - the 'NULL terminator' appended to zstrings is chr(0), or asc(!"\0") - but can also be defined as a pointer type, like `Cast(any ptr, 0)`.
Back to top
O
object (built-in TYPE or CLASS)
`Object` is a built-in type which provides Run-Time Type Information (RTTI) for all types derived from it using the `Extends` declaration, allowing them to be used with `Operator Is`, and to support `Virtual` and `Abstract` member functions.
object code
Code in machine-readable form that can be executed by your computer's CPU and operating system, usually linked with libraries to create an executable file.
operand
One of the arguments passed to an operator. For example, in the expression `a = b + c`, the operands are `a`, `b` and `c`, while the operators are `=` and `+`.
operator
A function taking one or more operands (arguments) and returning a value. Operators can work on built-in data types, or can be overloaded to work on user defined types. See `Operators`.
overload
To declare a procedure having the same name as another, but with different parameters. Free functions, or module-level functions, can be overloaded using the `Overload` keyword. `Type` or `Class` member functions can be overloaded by default.
override
Attribute to specify that a member function must override a `Virtual` or `Abstract` member function of a type less derived than the type it was declared in. Using the `Override` attribute, the compiler will show an error if the member function does not override anything.
Back to top
P
page buffer
A buffer used for holding the contents of the screen before being displayed on screen. Where multiple page buffers are allowed, one page will be visible to the users while all others are hidden. Also the active page (the one to which changes are made) need not be the visible one allowing changes to one page while showing another.
parameter
The name used by a procedure that corresponds to the argument that is passed to it.
parameter list
The parenthesized comma-separated list of parameters in a procedure declaration or definition.
PDS
Professional Development System. Sometimes referred to as QB7.1.
pitch
The number of bytes per row, in an image or screen buffer. If there is no padding between rows, then this can be calculated by `width * bytes_per_pixel`, but this is not necessarily safe to assume. The screen's pitch can be found using `ScreenInfo`, and an image buffer's pitch can be found by checking the `pitch` value in the image's header.
pointer
A data type used to hold addresses. The kind of pointer determines how the data at the address is interpreted when the pointer is dereferenced, or when used with `Operator -> (Pointer To Member Access)`. See `Pointers`.
polymorphism (TYPE or CLASS)
Polymorphism is the ability of an object to provide different behaviors (use different implementations) depending on its own nature, specifically depending on position of its real type in the inheritance hierarchy. Polymorphism is achieved by overriding `Virtual` or `Abstract` member functions of the base type.
preprocessor
The FreeBASIC preprocessor is responsible for expanding Macros and replacing Defined values with their values.
procedure
A generic name for any block of code that can be called from somewhere else in a program. See `Sub`, `Function`.
property
A property is a special sort of type/class members, intermediate between a field (or data member) and a method. See `Property`.
ptr
Shorthand for pointer. See pointer.
Back to top
Q
queue (container)
A collection of data that offers first-in first-out (FIFO) storage and retrieval. Typically, elements can only be inserted at the back and removed from the front but can be accessed from either end.
Back to top
R
ragged array (container)
A ragged array is an array having rows of differing lengths.
real number
Any positive or negative number including fractions, irrational and transcendental numbers (like `pi` or `e`) and zero. Variables containing a real number have a limited range and precision depending on the number of bits used to represent the number. See: `Single` and `Double`.
reference
A reference is an entity that is a way to access (in read and in write) data at memory location. A reference can be thought of as a pointer having as value the memory location, and which is implicitly dereferenced. See: `Byref (Variables)`.
registers
Places inside the CPU for data storage. 80386 and compatible 32-bit models have EAX, EBX, ECX, EDX, ESI, EDI, EBP and ESP, plus some special (control/test/debug) registers. NOT related to "Windows registry".
RHS
Acronym for "Right Hand Side".
RTTI
Acronym for "Run-Time Type Information". The `Object` built-in type provides the RTTI capacity for all types derived from it using the `Extends` declaration, allowing them to be used with `Operator Is`, and to support `Virtual` and `Abstract` member functions.
Back to top
S
scope
Refers to the life-time and visibility of some component of the program, like a variable or a procedure. For example, a variable defined inside a procedure would have procedure scope: it is visible throughout the procedure, but not outside the procedure's code block. When the procedure ends, the variable goes out of scope and no longer exists.
scope block
A code block where all the lines of source have the same scope. An explicit scope block can be indicated with the `Scope` statement. Scope blocks may also be implicit with the usage of `If..Then`, `For..Next`, and other compound statements.
shared library
A library that exists once on a system that multiple executables can link to at runtime. See `Shared Libraries (DLLs)`.
source code
Code written by the programmer, in a human-readable form, not yet compiled.
stack (container)
A collection of data that offers last-in first-out (LIFO) storage and retrieval. Typically, elements can only be inserted, accessed and removed from the top of the stack.
statement block
One or more lines of code bookended by a compound statement.
static library
A library that is linked into a program at link time. There is one copy of the library for each executable that links to it. All data is executable specific. See `Static Libraries`.
static member data
Member data that each instance of a `Type` or `Class` shares. This data is defined outside of any `Type` or `Class`, and takes up no space in the resulting object instance.
static member function
A member function without an implicit `this` reference as an argument. Static member functions can be called normally through a variable, or directly using the type's name and the scope resolution operator See `Static (Member)`.
static storage
Refers to storage in the `.BSS` or `.DATA` sections of an executable. Variables, objects and arrays with static storage are allocated and initialized at compile-time and destroyed (in the case of objects) and deallocated at program-termination. Explicitly initialized variables, objects and arrays are allocated in the `.DATA` section.
static variable/object/array
A variable, object or array with static storage.
Note: Some times, we talk about 'static array/string' (as opposed to 'dynamic array/string'), but here, the 'static' term applies on the size of the array/string (fixed length as opposed to 'dynamic' term for a variable length) .
Thus this 'static/dynamic' term does not apply on the storage type for data.
sub
A procedure defined using `Sub`, optionally taking parameters and not returning a value.
SVN
Subversion. A version control system that allows users to keep track of changes made to sources and documents. Used by FB in the past. (see also CVS and GIT)
SWIG
A tool that automatically translates C headers to FreeBASIC (although not always perfectly).
symbol
Used to refer to variables, labels, functions, methods, procedures, or other programmatic constructs in a program.
Back to top
T
.TEXT section
The part of the executable program that will contain program instructions and constant data.
this reference
A reference to an instance of a `Type` or `Class` that is passed as a hidden argument to non-static member functions of that type or class. Throughout the member function, this instance is referred to using the `this` keyword, See `This`.
thread
A thread of execution within a process (running program) that shares execution time with other threads in the same process. See Threading.
trace
To follow the execution of a program step-by-step either manually by examining the source code, or more practically with a debugger.
Back to top
U
union
A structure that can be used to store different types of variables, such as integers, doubles and fixed-length strings in the same location, but only one at a time. See `Union`.
user defined data type
A `Type`, `Union`, `Enum`, or `Class` data type.
Back to top
V
variable
A symbol representing data in memory.
VBDOS
Visual BASIC for DOS, a historical BASIC compiler by M$ from 1992, following after QBASIC. DOS platform dropped very soon, VBDOS never became popular.
vector
A series of data items in memory that can be accessed by an index number. Similar to an array except that vector elements are not necessarily all contained within a single block of memory.
virtual member function
A member function that can be overridden by a member function of a type more derived than the type it was declared in. See `Virtual (Member)`.
Back to top
W
warning
A message displayed by the compiler during compilation that suggests there may be potential problems with the current code.
wiki
An on-line system that provides a set of pages containing information that can be viewed and modified by the public. In this context, it is typically used to refer to the FreeBASIC on line documentation.
Back to top
X
x86
Refers to the instruction set compatible with the 8086 (and later) CPU architecture, FreeBASIC only supports 80386 and later.
Back to top
Y
Back to top
Z
zstring
A zstring is in essence a standard C style string terminated by a null character. This data type is provided for greater compatibility with C libraries.
Back to top