documentation
.HELP!
FreeBASIC Documentation
Variable Arguments
FreeBASIC
previous page
next page
Variable Arguments
... (Ellipsis)
va_first
va_arg
va_next
previous page
start
next page
Menu
Homepage
Table of contents
Table of Contents
Welcome to FreeBASIC
Getting Help with FreeBASIC
Language Documentation
Keywords - Alphabetical
Operators
.
...
_
__DATE__
__Date_Iso__
__Fb_64Bit__
__FB_ARGC__
__FB_ARGV__
__Fb_Arm__
__Fb_Asm__
__Fb_Backend__
__FB_BIGENDIAN__
__FB_BUILD_DATE__
__FB_CYGWIN__
__FB_DARWIN__
__FB_DEBUG__
__FB_DOS__
__FB_ERR__
__Fb_Fpmode__
__Fb_Fpu__
__FB_FREEBSD__
__Fb_Gcc__
__FB_LANG__
__FB_LINUX__
__FB_MAIN__
__FB_MIN_VERSION__
__FB_MT__
__FB_NETBSD__
__FB_OPENBSD__
__FB_OPTION_BYVAL__
__FB_OPTION_DYNAMIC__
__FB_OPTION_ESCAPE__
__FB_OPTION_EXPLICIT__
__Fb_Option_Gosub__
__FB_OPTION_PRIVATE__
__FB_OUT_DLL__
__FB_OUT_EXE__
__FB_OUT_LIB__
__FB_OUT_OBJ__
__Fb_Pcos__
__FB_SIGNATURE__
__FB_SSE__
__Fb_Unix__
__Fb_Vectorize__
__FB_VER_MAJOR__
__FB_VER_MINOR__
__FB_VER_PATCH__
__FB_VERSION__
__FB_WIN32__
__FB_XBOX__
__FILE__
__FILE_NQ__
__FUNCTION__
__FUNCTION_NQ__
__LINE__
__PATH__
__TIME__
#
#Assert
#define
#else
#elseif
#endif
#endmacro
#error
#if
#ifdef
#ifndef
#inclib
#include
#lang
#libpath
#line
#macro
#pragma
#print
#undef
$
$Dynamic
$Include
$Static
$Lang
A
Abs
Abstract (Member)
Access
Acos
Add (Graphics Put)
Alias
Allocate
Alpha (Graphics Put)
And
AndAlso
And (Graphics Put)
Any
Append
As
Assert
AssertWarn
Asc
Asin
Asm
Atan2
Atn
B
Base (Initialization)
Base (Member Access)
Beep
Bin
Binary
Bit
BitReset
BitSet
BLoad
Boolean
BSave
Byref (Parameters)
Byref (Function Results)
Byte
ByVal
C
Call
CAllocate
Case
Cast
Cbool
CByte
CDbl
cdecl
Chain
ChDir
Chr
CInt
Circle
Class
Clear
CLng
CLngInt
Close
Cls
Color
Command
Common
CondBroadcast
CondCreate
CondDestroy
CondSignal
CondWait
Const
Const (Member)
Const (Qualifier)
Constructor
Constructor (Module)
Continue
Cos
CPtr
CShort
CSign
CSng
CsrLin
CUByte
CUInt
CULng
CULngInt
CUnsg
CurDir
CUShort
Custom (Graphics Put)
CVD
CVI
CVL
CVLongInt
CVS
CVShort
D
Data
Date
DateAdd
DateDiff
DatePart
DateSerial
DateValue
Day
Deallocate
Declare
DefByte
DefDbl
defined
DefInt
DefLng
Deflongint
DefShort
DefSng
DefStr
DefUByte
DefUInt
Defulongint
DefUShort
Delete
Destructor
Destructor (Module)
Dim
Dir
Do
Do...Loop
Double
Draw
Draw String
DyLibFree
DyLibLoad
DyLibSymbol
E
Else
ElseIf
Encoding
End (Block)
End (Statement)
End If
Enum
Environ Statement
Environ
EOF
Eqv
Erase
Erfn
Erl
Ermn
Err
Error
Event (Message Data From Screenevent)
Exec
ExePath
Exit
Exp
Export
Extends
Extern
Extern...End Extern
F
False
Field
FileAttr
FileCopy
FileDateTime
FileExists
FileLen
Fix
Flip
For
For...Next
Format
Frac
Fre
FreeFile
Function
Function (Member)
G
Get (Graphics)
Get # (File I/O)
GetJoystick
GetKey
GetMouse
GoSub
Goto
H
Hex
HiByte
HiWord
Hour
I
If...Then
IIf
ImageConvertRow
ImageCreate
ImageDestroy
ImageInfo
Imp
Implements
Import
Inkey
Inp
Input (Statement)
Input (File I/O)
Input #
Input$
InStr
InStrRev
Int
Integer
Is (Select Case)
Is (Run-Time Type Information Operator)
IsDate
Isredirected
K
Kill
L
LBound
LCase
Left
Len
Let
Lib
Line
Line Input
Line Input #
LoByte
LOC
Local
Locate
Lock
LOF
Log
Long
LongInt
Loop
LoWord
Lpos
LPrint
LSet
LTrim
M
Mid (Statement)
Mid (Function)
Minute
MKD
MkDir
MKI
MKL
MKLongInt
MKS
MKShort
Mod
Month
MonthName
MultiKey
MutexCreate
MutexDestroy
MutexLock
MutexUnlock
N
Naked
Name
Namespace
Next
New
New (Placement)
Next (Resume)
Not
Now
O
Object
Oct
OffsetOf
On Error
On...Gosub
On...Goto
Once
Open
Open Com
Open Cons
Open Err
Open Lpt
Open Pipe
Open Scrn
Operator
Option()
Option Base
Option ByVal
Option Dynamic
Option Escape
Option Explicit
Option Gosub
Option Nogosub
Option NoKeyword
Option Private
Option Static
Or
Or (Graphics Put)
OrElse
Out
Output
Overload
Override
P
Paint
Palette
pascal
PCopy
Peek
PMap
Point
Pointcoord
Pointer
Poke
Pos
Preserve
PReset
Print
?
Print #
? #
Print Using
? Using
Private
Private: (Access Control)
ProcPtr
Property
Protected: (Access Control)
Pset (Statement)
Pset (Graphics Put)
Ptr
Public
Public: (Access Control)
Put (Graphics)
Put # (File I/O)
R
Random
Randomize
Read
Read (File Access)
Read Write (File Access)
Reallocate
ReDim
Rem
Reset
Restore
Resume
Resume Next
Return
RGB
RGBA
Right
RmDir
Rnd
RSet
RTrim
Run
S
SAdd
Scope
Screen
Screen (Console)
ScreenCopy
ScreenControl
ScreenEvent
ScreenInfo
ScreenGLProc
ScreenList
ScreenLock
ScreenPtr
ScreenRes
ScreenSet
ScreenSync
ScreenUnlock
Second
Seek (Statement)
Seek (Function)
Select Case
SetDate
SetEnviron
SetMouse
SetTime
Sgn
Shared
Shell
Shl
Shr
Short
Sin
Single
SizeOf
Sleep
Space
Spc
Sqr
Static
Static (Member)
stdcall
Step
Stick
Stop
Str
Strig
String (Function)
String
StrPtr
Sub
Sub (Member)
Swap
System
T
Tab
Tan
Then
This
Threadcall
ThreadCreate
Threaddetach
ThreadWait
Time
TimeSerial
TimeValue
Timer
To
Trans (Graphics Put)
Trim
True
Type (Alias)
Type (Temporary)
Type (Udt)
TypeOf
U
UBound
UByte
UCase
UInteger
Ulong
ULongInt
Union
Unlock
Unsigned
Until
UShort
Using (Print)
Using (Namespaces)
V
va_arg
va_first
va_next
Val
ValLng
ValInt
ValUInt
ValULng
Var
VarPtr
View Print
View (Graphics)
Virtual (Member)
W
Wait
WBin
WChr
Weekday
WeekdayName
Wend
While
While...Wend
WHex
Width
Window
WindowTitle
WInput
With
WOct
Write
Write #
Write (File Access)
WSpace
WStr
Wstring (Data Type)
Wstring (Function)
X
Xor
Xor (Graphics Put)
Y
Year
Z
ZString
Keywords - Functional
Arrays
Erase
LBound
ReDim
Preserve
UBound
Bit manipulation
Bit
BitReset
BitSet
HiByte
HiWord
LoByte
LoWord
Compiler switches
DefByte
DefDbl
DefInt
DefLng
Deflongint
DefShort
DefSng
DefStr
DefUByte
DefUInt
Defulongint
DefUShort
Option Base
Option ByVal
Option Dynamic
Option Escape
Option Explicit
Option Gosub
Option Nogosub
Option NoKeyword
Option Private
Option Static
Console
Beep
Cls
Color
CsrLin
Locate
Open Cons
Open Err
Open Pipe
Open Scrn
Pos
Print
?
Print Using
? Using
Screen (Console)
Spc
Tab
View (Console)
Width
Write
Data types and declarations
Boolean
Byte
As
Dim
Const
Const (Qualifier)
Double
Enum
Extends
Integer
Long
LongInt
Object
Scope
Shared
Short
String
Single
Static
Type
Type (Alias)
Type (Temporary)
UByte
UInteger
Ulong
ULongInt
Union
Unsigned
UShort
Var
With
WString
ZString
Date and time
Date
DateAdd
DateDiff
DatePart
DateSerial
DateValue
Day
Hour
IsDate
Minute
Month
MonthName
Now
Second
SetDate
SetTime
Time
TimeSerial
TimeValue
Timer
Year
Weekday
WeekdayName
Debug support
Assert
AssertWarn
Stop
Error handling
Erfn
Erl
Ermn
Err
Error
Local
On Error
Resume
Resume Next
Files
Access
Append
Binary
BLoad
BSave
Close
Encoding
EOF
FreeFile
Get # (File I/O)
Input (File I/O)
Input #
Line Input #
LOC
Lock
LOF
Open
Output
Print #
? #
Put # (File I/O)
Random
Read (File Access)
Read Write (File Access)
Reset
Seek (Statement)
Seek (Function)
Unlock
Write #
Write (File Access)
Graphics
Add (Graphics Put)
Alpha (Graphics Put)
And (Graphics Put)
Circle
Cls
Color
Custom (Graphics Put)
Draw
Draw String
Event (Message Data From Screenevent)
Flip
Get (Graphics)
ImageConvertRow
ImageCreate
ImageDestroy
ImageInfo
Line
Or (Graphics Put)
Paint
Palette
PCopy
PMap
Point
Pointcoord
PReset
PSet
Pset (Graphics Put)
Put (Graphics)
RGB
RGBA
Screen
ScreenControl
ScreenCopy
ScreenEvent
ScreenInfo
ScreenGLProc
ScreenList
ScreenLock
ScreenPtr
ScreenRes
ScreenSet
ScreenSync
ScreenUnlock
Trans (Graphics Put)
View (Graphics)
Window
Xor (Graphics Put)
Hardware access
Inp
Out
Wait
Open Com
Open Lpt
Lpt
Lpos
LPrint
Assignment Operators
=[>] (Assignment)
&= (Concatenate And Assign)
+= (Add And Assign)
-= (Subtract And Assign)
*= (Multiply And Assign)
/= (Divide And Assign)
\= (Integer Divide And Assign)
^= (Exponentiate And Assign)
Mod= (Modulus And Assign)
And= (Conjunction And Assign)
Eqv= (Equivalence And Assign)
Imp= (Implication And Assign)
Or= (Inclusive Disjunction And Assign)
Xor= (Exclusive Disjunction And Assign)
Shl= (Shift Left And Assign)
Shr= (Shift Right And Assign)
Let (Assignment)
Let() (Assignment)
Arithmetic Operators
+ (Add)
- (Subtract)
* (Multiply)
/ (Divide)
\ (Integer Divide)
^ (Exponentiate)
Mod (Modulus)
- (Negate)
Shl (Shift Left)
Shr (Shift Right)
Bitwise operators
And
Eqv
Imp
Or
Not
Xor
Short Circuit operators
AndAlso
OrElse
Math
Abs
Acos
Asin
Atan2
Atn
Cos
Exp
Fix
Frac
Int
Log
Randomize
Rnd
Sgn
Sin
Sqr
Tan
Memory
Allocate
CAllocate
Clear
Deallocate
Field
Fre
Peek
Poke
Reallocate
Meta Commands
$Dynamic
$Static
$Include
$Lang
Miscellaneous
Asm
Data
End (Block)
Is (Run-Time Type Information Operator)
Let
OffsetOf
Option()
To
Read
Rem
Restore
SizeOf
Swap
TypeOf
Modularizing
Common
DyLibFree
DyLibLoad
DyLibSymbol
Export
Extern
Extern...End Extern
Import
Namespace
Private
Public
Using (Namespaces)
Multithreading
CondBroadcast
CondCreate
CondDestroy
CondSignal
CondWait
MutexCreate
MutexDestroy
MutexLock
MutexUnlock
Threadcall
ThreadCreate
Threaddetach
ThreadWait
OS / shell
Chain
ChDir
Command
CurDir
Dir
End (Statement)
Environ
Exec
ExePath
FileAttr
FileCopy
FileDateTime
FileExists
FileLen
Isredirected
Kill
MkDir
Name
RmDir
Run
SetEnviron
Shell
System
WindowTitle
Pointers
Pointer
ProcPtr
Ptr
SAdd
StrPtr
VarPtr
Predefined symbols
__DATE__
__Date_Iso__
__Fb_64Bit__
__FB_ARGC__
__FB_ARGV__
__Fb_Arm__
__FB_BIGENDIAN__
__FB_BUILD_DATE__
__FB_CYGWIN__
__FB_DARWIN__
__FB_DEBUG__
__FB_DOS__
__FB_ERR__
__FB_FREEBSD__
__FB_LANG__
__FB_LINUX__
__FB_MAIN__
__FB_MIN_VERSION__
__FB_NETBSD__
__FB_OPENBSD__
__FB_OPTION_BYVAL__
__FB_OPTION_DYNAMIC__
__FB_OPTION_ESCAPE__
__FB_OPTION_EXPLICIT__
__Fb_Option_Gosub__
__FB_OPTION_PRIVATE__
__FB_OUT_DLL__
__FB_OUT_EXE__
__FB_OUT_LIB__
__FB_OUT_OBJ__
__FB_SIGNATURE__
__FB_SSE__
__FB_VERSION__
__FB_VER_MAJOR__
__FB_VER_MINOR__
__FB_VER_PATCH__
__FB_WIN32__
__FB_XBOX__
__FILE__
__FILE_NQ__
__FUNCTION__
__FUNCTION_NQ__
__FB_MT__
__LINE__
__PATH__
__TIME__
False
True
Preprocessor
#Assert
#define
#else
#elseif
#endif
#endmacro
#error
#if
#ifdef
#ifndef
#inclib
#include
#libpath
#lang
#line
#macro
#pragma
#print
#undef
defined
Once
Procedures
...
Abstract (Member)
Alias
Any
Base (Initialization)
Base (Member Access)
Byref (Parameters)
Byref (Function Results)
ByVal
Call
cdecl
Const (Member)
Constructor
Constructor (Module)
Destructor
Destructor (Module)
Declare
Function
Function (Member)
Lib
Naked
Operator
Overload
Override
pascal
Private (Member)
Protected (Member)
Property
Public (Member)
Static (Member)
Sub
Sub (Member)
stdcall
This
va_arg
va_first
va_next
Virtual (Member)
Program flow
Continue
Case
Do
Do...Loop
Else
ElseIf
End If
Exit
GoSub
Goto
If...Then
IIf
Is (Select Case)
For
For...Next
Loop
Next
On...Gosub
On...Goto
Return
Select Case
Sleep
Step
Then
Until
Wend
While
While...Wend
String functions
InStr
InStrRev
LCase
Left
Len
LSet
LTrim
Mid (Statement)
Mid (Function)
Right
RSet
RTrim
Space
String (Function)
Trim
UCase
WSpace
Wstring (Function)
String and number conversion
Asc
Bin
Chr
CVD
CVI
CVL
CVLongInt
CVS
CVShort
Format
Hex
MKD
MKI
MKL
MKLongInt
MKS
MKShort
Oct
Str
Val
ValLng
ValInt
ValUInt
ValULng
WBin
WChr
WHex
WOct
WStr
Type casting/conversion
Cast
Cbool
CByte
CDbl
CInt
CLng
CLngInt
CPtr
CShort
CSign
CSng
CUByte
CUInt
CULng
CULngInt
CUnsg
CUShort
User input
GetJoystick
GetKey
GetMouse
Inkey
Input
Input (Statement)
Line Input
MultiKey
SetMouse
Stick
Strig
WInput
Graphics Keywords
Add
Alpha
And (Graphics Put)
BLoad
BSave
Circle
Color
Custom
Draw
Draw String
Event (Message Data From Screenevent)
Flip
ImageConvertRow
ImageCreate
ImageDestroy
ImageInfo
Get (Graphics)
GetJoystick
GetMouse
Inp
Line (Graphics)
MultiKey
Out
Or (Graphics Put)
Paint
Palette
PCopy
PMap
Point
Pointcoord
PReset
PSet
Pset (Graphics Put)
Put (Graphics)
RGB
RGBA
Screen (Graphics)
ScreenControl
ScreenCopy
ScreenEvent
ScreenGLProc
ScreenInfo
ScreenList
ScreenLock
ScreenPtr
ScreenRes
ScreenSet
ScreenSync
ScreenUnlock
SetMouse
Trans
View (Graphics)
Wait
Window
WindowTitle
Xor (Graphics Put)
Operators List
Assignment Operators
=[>] (Assignment)
&= (Concatenate And Assign)
+= (Add And Assign)
-= (Subtract And Assign)
*= (Multiply And Assign)
/= (Divide And Assign)
\= (Integer Divide And Assign)
^= (Exponentiate And Assign)
Mod= (Modulus And Assign)
And= (Conjunction And Assign)
Eqv= (Equivalence And Assign)
Imp= (Implication And Assign)
Or= (Inclusive Disjunction And Assign)
Xor= (Exclusive Disjunction And Assign)
Shl= (Shift Left And Assign)
Shr= (Shift Right And Assign)
Let (Assignment)
Let() (Assignment)
Type Cast Operators
Cast
CPtr
Arithmetic Operators
+ (Add)
- (Subtract)
* (Multiply)
/ (Divide)
\ (Integer Divide)
^ (Exponentiate)
Mod (Modulus)
- (Negate)
Shl (Shift Left)
Shr (Shift Right)
Indexing Operators
() (Array Index)
[] (String Index)
[] (Pointer Index)
String Operators
+ (String Concatenation)
& (String Concatenation With Conversion)
Strptr (String Pointer)
Relational Operators
= (Equal)
<> (Not Equal)
< (Less Than)
<= (Less Than Or Equal)
>= (Greater Than Or Equal)
> (Greater Than)
Bitwise Operators
And (Conjunction)
Eqv (Equivalence)
Imp (Implication)
Not (Complement)
Or (Inclusive Disjunction)
Xor (Exclusive Disjunction)
Short Circuit Operators
Andalso (Short Circuit Conjunction)
Orelse (Short Circuit Inclusive Disjunction)
Preprocessor Operators
# (Argument Stringize)
## (Argument Concatenation)
! (Escaped String Literal)
$ (Non-Escaped String Literal)
Pointer Operators
@ (Address Of)
* (Value Of)
Varptr (Variable Pointer)
Procptr (Procedure Pointer)
Type or Class Operators
. (Member Access)
-> (Pointer To Member Access)
Is (Run-Time Type Information Operator)
Memory Operators
New
Placement New
Delete
Iteration Operators
For
Variables and Data Types
Variable Declarations
Dim
Const
Scope
Static
Shared
Var
User Defined Types
Declaration
Enum...End Enum
Type...End Type
Union...End Union
Extends
Field
Object
Referencing
Temporary Types
This
Base (Member Access)
Type Alias
With
Member Procedures
Base (Initialization)
Constructor
Destructor
Function
Operator
Override
Property
Sub
Static (Member)
Virtual
Abstract
Const (Member)
Member Access Control
Public: (Access Control)
Private: (Access Control)
Protected: (Access Control)
Standard Data Types
Integer types
Byte
UByte
Short
UShort
Long
Ulong
Integer
UInteger
LongInt
ULongInt
Floating-point types
Single
Double
Boolean types
Boolean
Data Type Modifiers
Const
Pointer
Ptr
Unsigned
String types
String
ZString
WString
Class types
Object
Standard Data Type Limits
Converting Between Data Types
Generic conversions
Cast
CPtr
Conversions to integral types
CByte
CUByte
CShort
CUShort
CLng
CULng
CInt
CUInt
CLngInt
CULngInt
CSign
CUnsg
Conversions to floating-point types
CSng
CDbl
Conversions to/from string types
Str
WStr
Val
ValInt
ValUInt
ValLng
ValULng
Conversion to boolean types
Cbool
Operators
Operators
Assignment operators
Operator =[>] (Assignment)
Operator &= (Concatenate And Assign)
Operator += (Add And Assign)
Operator -= (Subtract And Assign)
Operator *= (Multiply And Assign)
Operator /= (Divide And Assign)
Operator \= (Integer Divide And Assign)
Operator ^= (Exponentiate And Assign)
Operator Let (Assignment)
Operator Let() (Assignment)
Operator Mod= (Modulus And Assign)
Operator And= (Conjunction And Assign)
Operator Eqv= (Equivalence And Assign)
Operator Imp= (Implication And Assign)
Operator Or= (Inclusive Disjunction And Assign)
Operator Xor= (Exclusive Disjunction And Assign)
Operator Shl= (Shift Left And Assign)
Operator Shr= (Shift Right And Assign)
Arithmetic operators
Operator + (Add)
Operator - (Subtract)
Operator * (Multiply)
Operator / (Divide)
Operator \ (Integer Divide)
Operator ^ (Exponentiate)
Operator Mod (Modulus)
Operator - (Negate)
Operator Shl (Shift Left)
Operator Shr (Shift Right)
Conditional operators
Operator = (Equal)
Operator <> (Not Equal)
Operator < (Less Than)
Operator <= (Less Than Or Equal)
Operator >= (Greater Than Or Equal)
Operator > (Greater Than)
Operator Is (Run-Time Type Information)
Logical operators
Operator And (Conjunction)
Operator Eqv (Equivalence)
Operator Imp (Implication)
Operator Not (Complement)
Operator Or (Inclusive Disjunction)
Operator Xor (Exclusive Disjunction)
Short circuit operators
Operator Andalso (Short Circuit Conjunction)
Operator Orelse (Short Circuit Inclusive Disjunction)
Indexing operators
Operator () (Array Index)
Operator [] (String Index)
Operator [] (Pointer Index)
String operators
Operator + (String Concatenation)
Operator & (String Concatenation With Conversion)
Operator Strptr (String Pointer)
Preprocessor operators
Operator # (Stringize)
Operator ## (Concatenation)
Operator ! (Escaped String Literal)
Operator $ (Non-Escaped String Literal)
Pointer operators
Operator Varptr (Variable Pointer)
Operator Strptr (String Pointer)
Operator Procptr (Procedure Pointer)
Operator @ (Address Of)
Operator * (Value Of)
Type or Class operators
Operator . (Member Access)
Operator -> (Pointer To Member Access)
Operator Is (Run-Time Type Information)
Memory operators
Operator New
Operator Placement New
Operator Delete
Iterating operators
Operator For
Operator Step
Operator Next
Operator Precedence
Bitwise Operators & Truth Tables
Statements
Control Flow
Transferring Statements
Goto
GoSub
On Goto
On Gosub
Return
Branching Statements
If..End If
..Else If..
..Else..
Select..End Select
..Case..
..Case Else..
Intra-branch control
Exit Select
Looping Statements
While..Wend
For..Next
Do..Loop
Intra-loop control
Continue While
Continue For
Continue Do
Exit While
Exit For
Exit Do
Procedures
Declaration
Declare
Sub
Function
Overload
Static
Const (Member)
Static (Member)
Linkage
Public
Private
Alias
Export
Lib
Calling conventions
stdcall
cdecl
pascal
Parameter passing conventions
ByRef
ByVal
Any
Variadic Procedures
... (Ellipsis)
va_first
va_arg
va_next
Automatic execution
Constructor (Module)
Destructor (Module)
Miscellaneous
Byref (Function Results)
Call
Naked
Modularizing
Common
DyLibFree
DyLibLoad
DyLibSymbol
Export
Extern
Extern...End Extern
Import
Namespace
Private
Public
Using (Namespaces)
Other
Preprocessor
Conditional Compilation
#if
#ifdef
#ifndef
#elseif
#else
#endif
defined
Text Replacement
#define
#macro
#endmacro
#undef
! Escaped String Literal
$ Non-Escaped String Literal
File Directives
#include
#inclib
#libpath
Control Directives
#pragma
#lang
#print
#error
#Assert
#line
Metacommands
'$Include
'$Dynamic
'$Static
'$Lang
Escape Sequences In String Literals
Meta-statements
Metacommands
'$Dynamic
'$Include
'$Static
'$Lang
Compiler Options
Option Base
Option ByVal
Option Dynamic
Option Escape
Option Explicit
Option Gosub
Option Nogosub
Option NoKeyword
Option Private
Option Static
Set Default Datatypes
DefByte
DefDbl
DefInt
DefLng
Deflongint
DefShort
DefSng
DefStr
DefUByte
DefUInt
Defulongint
DefUShort
Intrinsic Defines
Platform Information
__FB_WIN32__
__FB_LINUX__
__FB_DOS__
__FB_CYGWIN__
__FB_FREEBSD__
__FB_NETBSD__
__FB_OPENBSD__
__FB_DARWIN__
__FB_XBOX__
__FB_BIGENDIAN__
__Fb_Pcos__
__Fb_Unix__
__Fb_64Bit__
__Fb_Arm__
Version Information
__FB_VERSION__
__FB_VER_MAJOR__
__FB_VER_MINOR__
__FB_VER_PATCH__
__FB_MIN_VERSION__
__FB_BUILD_DATE__
__FB_SIGNATURE__
Command-line switches
__Fb_Asm__
__Fb_Backend__
__Fb_Gcc__
__FB_MAIN__
__FB_DEBUG__
__FB_ERR__
__Fb_Fpmode__
__Fb_Fpu__
__FB_LANG__
__FB_MT__
__FB_OUT_DLL__
__FB_OUT_EXE__
__FB_OUT_LIB__
__FB_OUT_OBJ__
__FB_SSE__
__Fb_Vectorize__
Environment Information
__FB_ARGC__
__FB_ARGV__
__DATE__
__Date_Iso__
__TIME__
__PATH__
Context-specific Information
__FILE__
__FILE_NQ__
__FUNCTION__
__FUNCTION_NQ__
__LINE__
__FB_OPTION_BYVAL__
__FB_OPTION_DYNAMIC__
__FB_OPTION_ESCAPE__
__Fb_Option_Gosub__
__FB_OPTION_EXPLICIT__
__FB_OPTION_PRIVATE__
Error Handling
Inline Asm
Runtime Library Reference
Array Functions
Defining Arrays
Option Dynamic
'$Dynamic
Option Static
'$Static
ReDim
Preserve
Clearing Array Data
Erase
Retrieving Array Size
LBound
UBound
Bit Manipulation
Byte Manipulation Macros
LoByte
HiByte
LoWord
HiWord
Bit Manipulation Macros
Bit
BitReset
BitSet
Console Functions
Configuring the Console
Cls
Width
View Print
Cursor Color and Positioning
Color
CsrLin
Pos
Locate
Screen (Console)
Writing Text to the Console
Print
?
Print Using
? Using
Write
Spc
Tab
Date and Time Functions
VisualBasic compatible procedures
Now
Creating Date serials
DateSerial
TimeSerial
DateValue
TimeValue
Extracting information from Date serials
Second
Minute
Hour
Day
Weekday
Month
Year
DatePart
Extracting information from Date serials
DateAdd
DateDiff
Miscellaneous
IsDate
MonthName
WeekdayName
Date and time procedures
Date
Time
SetDate
SetTime
Timer
Error Handling Functions
Determining Errors
Erl
Erfn
Ermn
Err
Error
Handling Errors
On Error
On Local Error
Resume
Resume Next
File IO Functions
Opening Files or Devices
FreeFile
Open
Open Com
Open Cons
Open Err
Open Lpt
Open Pipe
Open Scrn
Close
Reset
File I/O modes
Input (File Mode)
Output
Append
Binary
Random
File access privileges
Access
Read (File Access)
Write (File Access)
Read Write(File Access)
Character encoding
Encoding
Reading from and Writing to Files or Devices
Input #
Write #
Input()
Winput()
Line Input #
Print #
? #
Put #
Get #
File Position and other Info
LOF
LOC
EOF
Seek (Statement)
Seek (Function)
Lock
Unlock
Mathematical Functions
Algebraic Procedures
Abs
Exp
Log
Sqr
Fix
Frac
Int
Sgn
Trigonometric Procedures
Sin
Asin
Cos
Acos
Tan
Atn
Atan2
Miscellaneous Procedures
Randomize
Rnd
Memory Functions
Working with Dynamic Memory
Allocate
CAllocate
Reallocate
Deallocate
Miscellaneous Procedures
Peek
Poke
Clear
Swap
SAdd
Operating System Functions
Working with Files
Exec
Chain
Run
Kill
Name
Working with Directories
CurDir
ChDir
Dir
ExePath
MkDir
RmDir
File Properties
FileAttr
FileCopy
FileDateTime
FileExists
FileLen
System Procedures
Fre
Command
Environ
Isredirected
SetEnviron
Shell
System
String Functions
Creating Strings
String
String (Function)
ZString
WString
Wstring (Function)
Space
WSpace
Len
Character Conversion
Asc
Chr
WChr
Numeric/Boolean to String Conversions
Bin
WBin
Hex
WHex
Oct
WOct
Str
WStr
Format
String to Numeric Conversions
Val
ValInt
ValLng
ValUInt
ValULng
Numeric Serialization
MKD
MKI
MKL
MKLongInt
MKS
MKShort
CVD
CVI
CVL
CVLongInt
CVS
CVShort
Working with Substrings
Left
Mid (Function)
Right
LCase
UCase
LTrim
RTrim
Trim
InStr
InStrRev
Mid (Statement)
LSet
RSet
Threading Support Functions
Threads
Threadcall
ThreadCreate
Threaddetach
ThreadWait
Conditional Variables
CondCreate
CondWait
CondSignal
CondBroadcast
CondDestroy
Mutexes
MutexCreate
MutexLock
MutexUnlock
MutexDestroy
User Input Functions
Reading values from the keyboard buffer
Input
Line Input
Input()
Winput()
Reading keys from the keyboard buffer
Inkey
GetKey
Graphics Library Reference
2D Drawing Functions
Working with Color
Color
Palette
RGB
RGBA
Point
Drawing to Image Buffers
PSet
PReset
Line (Graphics)
Circle
Draw
Draw String
Paint
Image Buffer Creation
Get (Graphics)
ImageCreate
ImageDestroy
ImageConvertRow
ImageInfo
BLoad
BSave
Blitting Image Buffers
Put (Graphics)
Blending Methods
Add
Alpha
And
Or
PSet
Trans
Custom
Xor
User Input Functions
Mouse and Joystick Input
GetMouse
SetMouse
GetJoystick
Stick
Strig
Keyboard Input
MultiKey
Screen Functions
Working with screen modes
ScreenList
Screen
ScreenRes
ScreenInfo
ScreenControl
ScreenEvent
ScreenGLProc
WindowTitle
Working with pages
Cls
ScreenSet
ScreenCopy
PCopy
Flip
ScreenSync
Working video memory
ScreenPtr
ScreenLock
ScreenUnlock
Screen Metrics
View (Graphics)
Window
PMap
Pointcoord
Supported graphics drivers (backends)
Keyboard Scan Codes
Default Palettes
Tutorials
Programmer's Guide
Getting Started
Hello World
FreeBASIC Primer #1
Source Files
Source Files (.bas)
Header Files (.bi)
Using Prebuilt Libraries
Lexical Conventions
Comments
Identifier Rules
Literals
Labels
Line continuation
Variables and Datatypes
Coercion and Conversion
Constants
Variables
Arrays
Overview
Fixed-length Arrays
Variable-length Arrays
Array Indexing
Pointers
Overview
Pointer Arithmetic
Declarations
Implicit Declarations
Initialization
Storage Classes
Variable Scope
Variable and Procedure Linkage
User Defined Types
Overview
Type Aliases
Temporary Types
Constructors and Destructors
Member Procedures
Properties
Member Access Rights
Operator Overloading
Types as Objects
Statements and Expressions
Operators List
Assignment operators
Operator =[>] (Assignment)
Operator &= (Concatenate And Assign)
Operator += (Add And Assign)
Operator -= (Subtract And Assign)
Operator *= (Multiply And Assign)
Operator /= (Divide And Assign)
Operator \= (Integer Divide And Assign)
Operator ^= (Exponentiate And Assign)
Operator Let (Assignment)
Operator Let() (Assignment)
Operator Mod= (Modulus And Assign)
Operator And= (Conjunction And Assign)
Operator Eqv= (Equivalence And Assign)
Operator Imp= (Implication And Assign)
Operator Or= (Inclusive Disjunction And Assign)
Operator Xor= (Exclusive Disjunction And Assign)
Operator Shl= (Shift Left And Assign)
Operator Shr= (Shift Right And Assign)
Arithmetic operators
Operator + (Add)
Operator - (Subtract)
Operator * (Multiply)
Operator / (Divide)
Operator \ (Integer Divide)
Operator ^ (Exponentiate)
Operator Mod (Modulus)
Operator - (Negate)
Operator Shl (Shift Left)
Operator Shr (Shift Right)
Conditional operators
Operator = (Equal)
Operator <> (Not Equal)
Operator < (Less Than)
Operator <= (Less Than Or Equal)
Operator >= (Greater Than Or Equal)
Operator > (Greater Than)
Operator Is (Run-Time Type Information)
Logical operators
Operator And (Conjunction)
Operator Eqv (Equivalence)
Operator Imp (Implication)
Operator Not (Complement)
Operator Or (Inclusive Disjunction)
Operator Xor (Exclusive Disjunction)
Short circuit operators
Operator Andalso (Short Circuit Conjunction)
Operator Orelse (Short Circuit Inclusive Disjunction)
Indexing operators
Operator () (Array Index)
Operator [] (String Index)
Operator [] (Pointer Index)
String operators
Operator + (String Concatenation)
Operator & (String Concatenation With Conversion)
Operator Strptr (String Pointer)
Preprocessor operators
Operator # (Stringize)
Operator ## (Concatenation)
Operator ! (Escaped String Literal)
Operator $ (Non-Escaped String Literal)
Pointer operators
Operator Varptr (Variable Pointer)
Operator Strptr (String Pointer)
Operator Procptr (Procedure Pointer)
Operator @ (Address Of)
Operator * (Value Of)
Type or Class operators
Operator . (Member Access)
Operator -> (Pointer To Member Access)
Operator Is (Run-Time Type Information)
Memory operators
Operator New
Operator Placement New
Operator Delete
Iterating operators
Operator For
Operator Step
Operator Next
Operator Precedence
Control Flow Statements
Procedures
Procedures Overview
Passing Arguments to Procedures
Returning a Value
Calling Conventions
Pointers to Procedures
Variable Arguments
... (Ellipsis)
va_first
va_arg
va_next
Making Binaries
Static Libraries
Shared Libraries (DLLs)
Profiling
Preprocessor
Other Topics
ASCII
Date Serials
Radians
FreeBASIC GfxLib overview
Internal Graphics Formats
Inline Asm
Error Handling
Intrinsic Defines
Platform Information
__FB_WIN32__
__FB_LINUX__
__FB_DOS__
__FB_CYGWIN__
__FB_FREEBSD__
__FB_NETBSD__
__FB_OPENBSD__
__FB_DARWIN__
__FB_XBOX__
__FB_BIGENDIAN__
__Fb_Pcos__
__Fb_Unix__
__Fb_64Bit__
__Fb_Arm__
Version Information
__FB_VERSION__
__FB_VER_MAJOR__
__FB_VER_MINOR__
__FB_VER_PATCH__
__FB_MIN_VERSION__
__FB_BUILD_DATE__
__FB_SIGNATURE__
Command-line switches
__Fb_Asm__
__Fb_Backend__
__Fb_Gcc__
__FB_MAIN__
__FB_DEBUG__
__FB_ERR__
__Fb_Fpmode__
__Fb_Fpu__
__FB_LANG__
__FB_MT__
__FB_OUT_DLL__
__FB_OUT_EXE__
__FB_OUT_LIB__
__FB_OUT_OBJ__
__FB_SSE__
__Fb_Vectorize__
Environment Information
__FB_ARGC__
__FB_ARGV__
__DATE__
__Date_Iso__
__TIME__
__PATH__
Context-specific Information
__FILE__
__FILE_NQ__
__FUNCTION__
__FUNCTION_NQ__
__LINE__
__FB_OPTION_BYVAL__
__FB_OPTION_DYNAMIC__
__FB_OPTION_ESCAPE__
__Fb_Option_Gosub__
__FB_OPTION_EXPLICIT__
__FB_OPTION_PRIVATE__
C Standard Library Functions
File I/O in FreeBASIC
Community Tutorials
Community Code Library
External Libraries Index
Graphical/test-based user interfaces
CGUI
Curses
GTK+
IUP
wxC
Windows API
X11
Graphics
Allegro
DUGL
caca
Cairo
DISLIN
freeglut
FreeImage
Freetype2
GD
GIFLIB
GLUT
GLFW
GRX
IL (DevIL)
japi
jpeglib
JPGalleg
libpng
OpenGL
PDFlib
SDL
TinyPTC
Music/Sound, Audio/Video
BASS
BASSMOD
Flite
FMOD
MediaInfo
mpg123
Ogg
OpenAL
PortAudio
sndfile
VLC
Vorbis
Database
GDBM
MySQL
PostgreSQL
SQLite
Development Helpers
CUnit
GDSL
gettext (includes libintl)
GNU ASpell
libbfd
Embeddable Languages
JNI
json-c
libffi
libjit
Lua
SpiderMonkey
Cryptography
cryptlib
UUID
Mathematics
big_int
Chipmunk
GMP
GSL
Newton
ODE
Networking
cgi-util
curl
FastCGI
ZeroMQ
eXtensible Markup Language (XML)
Expat
libxml
libxslt
Mini-XML
Regular Expressions
PCRE
TRE
Compression
bzip2
libzip
liblzma
LZO
QuickLZ
zlib
System APIs
C Runtime Library
DOS API
disphelper
GLib
Windows API
X11
User Contributed Libraries
Using the FreeBASIC compiler
Installing FreeBASIC
Requirements
Running FreeBASIC
Using the Command Line
Command Line Options
@< file >
-a < name >
-arch < type >
-asm < format >
-b < name >
-c
-C
-d < name=val >
-dll
-dylib
-e
-ex
-exx
-export
-forcelang <name>
-fpmode < type >
-fpu < type >
-g
-gen < backend >
-i < name >
-include < name >
-l < name >
-lang < name >
-lib
-m < name >
-map < name >
-maxerr < val >
-mt
-nodeflibs
-noerrline
-o < name >
-O < level >
-p < name >
-pic
-pp
-prefix < path >
-print < option >
-profile
-r
-R
-rr
-RR
-s < name >
-showincludes
-static
-target < platform >
-t < value >
-v
-vec < level >
-version
-w < value >
-Wa < opt >
-Wc < opt >
-Wl < opt >
-x < name >
-z < value >
Debugging with FreeBASIC
Compiler Error Messages
Tools used by fbc
FreeBASIC dialects and QBASIC
FreeBASIC and Qbasic
Differences from QB
FreeBASIC Dialects
FAQs
Compiler FAQ
Graphics Library FAQ
Runtime Library FAQ
Xbox port FAQ
DOS related FAQ
Windows related FAQ
Linux related FAQ
Miscellaneous
Obsolete Keywords
Glossary
Miscellaneous Keywords
Data
Data
Read
Restore
Debugging
Assert
AssertWarn
Stop
Hardware Access
Inp
LPrint
Lpos
Out
Wait
Operating System
Beep
Sleep
End (Statement)
Stub Pages
As
For
To
Is
Step
Control Flow
Do
End If
IIf
Loop
Next
Then
Until
Wend
While
Uncategorized
End (Block)
OffsetOf
SizeOf
TypeOf
Let
Rem
Option()
C Standard Library Functions
ASCII Character Codes
Runtime Error Codes
C/C++ vs. FreeBASIC syntax comparison
C/C++ vs. FreeBASIC integer data type comparison
Hacking on FreeBASIC
Developer's Table of Contents
Get in touch
Submit feedback about this site to:
[email protected]