BlitzMax

BlitzMax

  • Downloads
  • Docs
  • API
  • Resources
  • About

›Blitz

BlitzMax API

  • Introduction

BRL

    Audio

    • Introduction
    • TChannel
    • TSound

    AudioSample

    • Introduction
    • TAudioSample
    • TAudioSampleLoader

    Bank

    • Introduction
    • TBank

    BankStream

    • Introduction
    • TBankStream

    Base64

    • Introduction
    • TBase64

    Blitz

    • Introduction
    • TArrayBoundsException
    • TBlitzException
    • TIllegalArgumentException
    • TInvalidEnumException
    • TNullFunctionException
    • TNullMethodException
    • TNullObjectException
    • TOutOfDataException
    • TRuntimeException
    • IIterable
    • IIterator
    • ICloseable

    Clipboard

    • Introduction
    • TClipboard
    • TClipboardOpts
    • TWin32ClipboardOpts
    • TX11ClipboardOpts

    Color

    • Introduction
    • SColor8
  • BRL.D3D7Max2D
  • BRL.D3D9Max2D
  • BRL.DirectSoundAudio
  • BRL.EndianStream
  • Event

    • Introduction
    • TEvent
  • BRL.EventQueue
  • FileSystem

    • Introduction
    • IFileWalker
    • SFileAttributes
    • EFileWalkOption
    • EFileWalkResult
  • BRL.FreeAudioAudio
  • BRL.GLGraphics
  • BRL.GLMax2D
  • Glob

    • Introduction
    • EGlobOptions
    • TGlobIter
  • BRL.GNet
  • BRL.Graphics
  • BRL.Hook
  • IO

    • Introduction
    • MaxIO
  • BRL.KeyCodes
  • LinkedList

    • Introduction
    • TList
    • TListEnum
    • TLink

    Map

    • Introduction
    • TMap
  • BRL.Math
  • Max2D

    • Introduction
    • TImage

    MaxLua

    • Introduction
    • TLuaClass
    • TLuaObject

    MaxUnit

    • Introduction
    • TTest
    • TAssert
  • BRL.OGGLoader
  • BRL.OpenALAudio
  • Path

    • Introduction
    • TPath
    • IPathWalker
    • SPathAttributes
    • TPathDirIterator

    Pixmap

    • Introduction
    • TPixmap
    • TPixmapLoader
  • BRL.PolledInput
  • BRL.RamStream
  • Random

    • Introduction
    • TRandomDefault

    RectPacker

    • Introduction
    • EPackingMethod
    • SPackedRect
    • TPackedSheet
    • TRectPacker

    Reflection

    • Introduction
    • TTypeId
    • TMember
    • TConstant
    • TField
    • TGlobal
    • TFunction
    • TMethod
  • BRL.Retro
  • BRL.Socket
  • BRL.SocketStream
  • BRL.StandardIO
  • Stream

    • Introduction
    • TCStream
    • TIO
    • TStream
    • TStreamException
    • TStreamFactory
    • TStreamReadException
    • TStreamWrapper
    • TStreamWriteException

    StringBuilder

    • Introduction
    • TStringBuilder
    • TSplitBuffer
  • BRL.System
  • BRL.SystemDefault
  • BRL.TextStream
  • ThreadPool

    • Introduction
    • TRunnable
    • TThreadPoolExecutor

    Threads

    • Introduction
    • TThread
    • TThreadData
    • TMutex
    • TSemaphore
    • TCondVar

    Time

    • Introduction
    • ETimeUnit
    • TTimeoutException

    Timer

    • Introduction
    • TChrono
  • BRL.TimerDefault
  • Volumes

    • Introduction
    • TVolume
  • BRL.WAVLoader

Pub

  • Pub.FreeJoy
  • Pub.FreeProcess
  • Pub.Glad
  • Pub.Glew
  • Joystick

    • Introduction
    • TJoystickDriver
  • Pub.Lua
  • Pub.OpenAL
  • Pub.OpenGLES
  • StdC

    • Introduction
    • SDateTime
  • Pub.xmmintrin

Collections

    IntMap

    • Introduction
    • TIntMap

    ObjectList

    • Introduction
    • TObjectList
    • TObjectListEnumerator
    • TObjectListReverseEnumerator

    ObjectMap

    • Introduction
    • TObjectMap

    PtrMap

    • Introduction
    • TPtrMap

    StringMap

    • Introduction
    • TStringMap

Crypto

    Digest

    • Introduction
    • TMessageDigest
    • TDigestRegister

    Cipher

    • Introduction
    • TCipher
    • TCipherMode
    • Crypto.AESCipher
    • Crypto.AnubisCipher
    • Crypto.BlowfishCipher
    • Crypto.CamelliaCipher
    • Crypto.Cast5Cipher
    • Crypto.DESCipher
    • Crypto.IdeaCipher
    • Crypto.KasumiCipher
    • Crypto.KhazadCipher
    • Crypto.KSeedCipher
    • Crypto.NoekeonCipher
    • Crypto.SerpentCipher
    • Crypto.SkipjackCipher
    • Crypto.TwofishCipher
    • Crypto.XTeaCipher

    CBCMode

    • Introduction
    • TCBCCipherMode

    CFBMode

    • Introduction
    • TCFBCipherMode

    CTRMode

    • Introduction
    • TCTRCipherMode

    ECBMode

    • Introduction
    • TECBCipherMode

    F8Mode

    • Introduction
    • TF8CipherMode

    LRWMode

    • Introduction
    • TLRWCipherMode

    OFBMode

    • Introduction
    • TOFBCipherMode

    XTSMode

    • Introduction
    • TXTSCipherMode

    Blake2BDigest

    • Introduction
    • TBlake2B_512
    • TBlake2B_384
    • TBlake2B_256
    • TBlake2B_160

    CRC32

    • Introduction
    • TCRC32

    MD5Digest

    • Introduction
    • TMD5

    Ripemd320Digest

    • Introduction
    • TRipemd320

    Ripemd356Digest

    • Introduction
    • TRipemd256

    Ripemd160Digest

    • Introduction
    • TRipemd160

    Ripemd128Digest

    • Introduction
    • TRipemd128

    SHA1Digest

    • Introduction
    • TSHA1

    SHA256Digest

    • Introduction
    • TSHA256

    SHA512Digest

    • Introduction
    • TSHA512

    SHA3Digest

    • Introduction
    • TSHA3_512
    • TSHA3_384
    • TSHA3_256
    • TSHA3_224

    TigerDigest

    • Introduction
    • TTiger

    WhirlpoolDigest

    • Introduction
    • TWhirlpool

    Crypto

    • Introduction
    • TCryptoRandom
    • TCryptoSecretBox
    • TCryptoHash
    • TCryptoSign
    • TCryptoKeyExchange
    • TCryptoKey
    • TCryptoHashKey
    • TCryptoSecretBoxKey
    • TCryptoSignature
    • TCryptoExchangeKeyPair
    • TCryptoSessionKeyPair
    • TCryptoNPacket
    • TCryptoKK1Packet
    • TCryptoKK2Packet
    • TCryptoXX1Packet
    • TCryptoXX2Packet
    • TCryptoXX3Packet
    • TCryptoExchangeState
    • TCryptoPWHashMasterKey
    • TCryptoPWHashStoredKey
    • TCryptoPasswordHash

Math

    Matrix

    • Introduction
    • SMat2D
    • SMat2F
    • SMat2I
    • SMat3D
    • SMat3F
    • SMat3I
    • SMat4D
    • SMat4F
    • SMat4I

    Quaternion

    • Introduction
    • SQuatD
    • SQuatF
    • SQuatI

    Vector

    • Introduction
    • SVec2D
    • SVec2F
    • SVec2I
    • SVec3D
    • SVec3F
    • SVec3I
    • SVec4D
    • SVec4F
    • SVec4I

MaxGUI

  • MaxGUI.MaxGUI
  • MaxGUI.Drivers
  • MaxGUI.Localization
  • MaxGUI.ProxyGadgets
  • MaxGUI.CocoaMaxGUI
  • MaxGUI.Win32MaxGUIEx

Net

    Http

    • Introduction
    • THttpClient
    • THttpRequest
    • THttpResponse
    • THttpResult
    • TUrl
    • ICompleteListener
    • ICookie
    • THttpClientException
    • THttpCookie
    • THttpCookieBuilder
    • THttpField
    • THttpFields
    • TRetryPolicy
    • TUrlBuilder
    • TContent
    • TStringContent
    • TStreamContent
    • TBytePtrContent
    • TByteArrayContent
    • TBankContent
    • TCAStore
    • ECookieAttribute
    • EHttpAuthMethod
    • EHttpHeader
    • EHttpMethod
    • EUrlCode
    • EUrlPart

Random

    Core

    • Introduction
    • TRandom
  • Random.PRVHASH
  • Random.Secure
  • SFMT

    • Introduction
    • TSFMTRandom
  • Random.Squares
  • Random.Xoshiro

SDL

    SDL

    • Introduction
    • TSDLStream

    SDLSystem

    • Introduction
    • TSDLMultiGesture

    SDLVideo

    • Introduction
    • TSDLDisplay
    • TSDLGLContext
    • TSDLWindow

    SDLRender

    • Introduction
    • TSDLRenderer
    • TSDLTexture

    SDLTimer

    • Introduction
    • TSDLTimer

    SDLHaptic

    • Introduction
    • TSDLHaptic
    • TSDLHapticCondition
    • TSDLHapticConstant
    • TSDLHapticCustom
    • TSDLHapticDirection
    • TSDLHapticEffect
    • TSDLHapticLeftRight
    • TSDLHapticPeriodic
    • TSDLHapticRamp

    SDLSensor

    • Introduction
    • TSDLSensor
  • SDL.SDLFreeAudio
  • SDL.GLSDLMax2D
  • SDL.GL2SDLMax2D
  • SDL.D3D9SDLMax2D
  • SDLVirtualJoystick

    • Introduction
    • TVirtualJoystick

Steam

    SteamSDK

    • Introduction
    • TSteamClient
    • TSteamUtils
    • TSteamUserStats
    • TSteamFriends
    • TSteamUGC
    • ISteamFriendsListener
    • ISteamUGCListener
    • ISteamUserStatsListener
    • ISteamUtilsListener
    • EItemPreviewType
    • EPersonaChange
    • EPersonaState
    • ERemoteStoragePublishedFileVisibility
    • EUGCMatchingUGCType
    • EUGCQuery
    • EUserRestriction
    • EUserUGCList
    • EWorkshopFileType

Text

    CP932Encoding

    • Text.CP932Encoding

    CSV

    • Introduction
    • TCsvParser
    • TCsvHeader
    • TCsvRow
    • TCsvOptions
    • SCsvColumn

    Encoding

    • Text.Encoding

    Format

    • Introduction
    • TFormatter

    Graphviz

    • Introduction
    • TGVGraphviz
    • TAGraph

    Ini

    • Introduction
    • TIni
    • TIniProperty
    • TIniSection

    JConv

    • Introduction
    • TJConv
    • TJConvBuilder
    • TJConvSerializer

    Json

    • Introduction
    • TJSON
    • TJSONObject
    • TJSONString
    • TJSONInteger
    • TJSONReal
    • TJSONBool
    • TJSONArray
    • TJSONNull
    • TJSONError
    • TJSONNumber

    Markdown

    • Introduction
    • TMarkdown
    • IMDRenderer

    Pikchr

    • Introduction
    • EPikChrFlags

    Regex

    • Introduction
    • TRegEx
    • TRegExMatch
    • TRegExOptions
    • TRegExException

    TOML

    • Introduction
    • ETomlNodeType
    • TToml
    • ITomlNode
    • STomlDate
    • STomlDateTime
    • STomlTime
    • TTomlArray
    • TTomlInteger
    • TTomlString
    • TTomlTable
    • TTomlBoolean

    Xml

    • Introduction
    • TxmlDoc
    • TxmlNode
    • TxmlAttribute
Edit

BRL.Blitz

The Blitz runtime module provides low level functionality required by BlitzMax applications when they are running. This includes things like memory management, exception handling and string and array operations.

Much of the functionality provided by this module is hidden from application programmers, but is instead used 'behind the scenes' by the compiler. However, there are some very useful commands for debugging, memory management and simple standard IO.

Types

TypeDescription
TBlitzExceptionException
TNullObjectExceptionNull object exception
TNullMethodExceptionNull method exception
TNullFunctionExceptionNull function exception
TArrayBoundsExceptionArray bounds exception
TOutOfDataExceptionOut of data exception
TRuntimeExceptionRuntime exception
TInvalidEnumExceptionInvalid enum exception
TIllegalArgumentExceptionIllegal argument exception
TUnsupportedOperationExceptionUnsupported operation exception
TInvalidOperationExceptionInvalid operation exception

Interfaces

InterfaceDescription
IIterableIterable interface
IIteratorIterator interface
ICloseableAn object that can be closed to release resources.

Structs

StructDescription
SGCStatsStructure for holding Garbage Collection statistics as provided by GCGetStats().

Functions

Function Max:Int(a:Int, b:Int) Inline

Returns the larger of the two Int arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Long(a:Long, b:Long) Inline

Returns the larger of the two Long arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Float(a:Float, b:Float) Inline

Returns the larger of the two Float arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Double(a:Double, b:Double) Inline

Returns the larger of the two Double arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Byte(a:Byte, b:Byte) Inline

Returns the larger of the two Byte arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Short(a:Short, b:Short) Inline

Returns the larger of the two Short arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:UInt(a:UInt, b:UInt) Inline

Returns the larger of the two UInt arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:ULong(a:ULong, b:ULong) Inline

Returns the larger of the two ULong arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:Size_T(a:Size_T, b:Size_T) Inline

Returns the larger of the two Size_T arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:LongInt(a:LongInt, b:LongInt) Inline

Returns the larger of the two LongInt arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Max:ULongInt(a:ULongInt, b:ULongInt) Inline

Returns the larger of the two ULongInt arguments.

Example

Rem
Max
Max evaluates to the value of the largest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Max(10,20)    '20
Print Max(20,10)    '20


Function Min:Int(a:Int, b:Int) Inline

Returns the lesser of the two Int arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Long(a:Long, b:Long) Inline

Returns the lesser of the two Long arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Float(a:Float, b:Float) Inline

Returns the lesser of the two Float arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Double(a:Double, b:Double) Inline

Returns the lesser of the two Double arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Byte(a:Byte, b:Byte) Inline

Returns the lesser of the two Byte arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Short(a:Short, b:Short) Inline

Returns the lesser of the two Short arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:UInt(a:UInt, b:UInt) Inline

Returns the lesser of the two UInt arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:ULong(a:ULong, b:ULong) Inline

Returns the lesser of the two ULong arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:Size_T(a:Size_T, b:Size_T) Inline

Returns the lesser of the two Size_T arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:LongInt(a:LongInt, b:LongInt) Inline

Returns the lesser of the two LongInt arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Min:ULongInt(a:ULongInt, b:ULongInt) Inline

Returns the lesser of the two ULongInt arguments.

Example

Rem
Min evaluates to the value of the smallest of the two operators.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Min(10,20)    '10
Print Min(20,10)    '10


Function Abs:Int(a:Int) Inline

Returns the absolute value of the Int argument.

Example

Rem
Abs is a mathematical operator that performs the Absolute function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local f:Float = -1 To 1 Step 0.125
    Print "Abs "+f+"="+Abs f
Next


Function Abs:Float(a:Float) Inline

Returns the absolute value of the Float argument.

Example

Rem
Abs is a mathematical operator that performs the Absolute function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local f:Float = -1 To 1 Step 0.125
    Print "Abs "+f+"="+Abs f
Next


Function Abs:Double(a:Double) Inline

Returns the absolute value of the Double argument.

Example

Rem
Abs is a mathematical operator that performs the Absolute function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local f:Float = -1 To 1 Step 0.125
    Print "Abs "+f+"="+Abs f
Next


Function Abs:Long(a:Long) Inline

Returns the absolute value of the Long argument.

Example

Rem
Abs is a mathematical operator that performs the Absolute function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local f:Float = -1 To 1 Step 0.125
    Print "Abs "+f+"="+Abs f
Next


Function Sgn:Int(a:Int) Inline

Returns the sign of the Int argument.

Example

Rem
Sgn is a mathematical operator that returns the sign of a value.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Sgn 50    '1
Print Sgn 0     '0
Print Sgn -50   '-1


Function Sgn:Float(a:Float) Inline

Returns the sign of the Float argument.

Example

Rem
Sgn is a mathematical operator that returns the sign of a value.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Sgn 50    '1
Print Sgn 0     '0
Print Sgn -50   '-1


Function Sgn:Double(a:Double) Inline

Returns the sign of the Double argument.

Example

Rem
Sgn is a mathematical operator that returns the sign of a value.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Sgn 50    '1
Print Sgn 0     '0
Print Sgn -50   '-1


Function Sgn:Long(a:Long) Inline

Returns the sign of the Long argument.

Example

Rem
Sgn is a mathematical operator that returns the sign of a value.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Sgn 50    '1
Print Sgn 0     '0
Print Sgn -50   '-1


Function RuntimeError( message:String )

Generate a runtime error

Throws a TRuntimeException.

Example

' runtimeerror.bmx

SuperStrict

Framework BRL.StandardIO


Local a:Int

If a=0 RuntimeError "This program has failed badly."


Function IllegalArgumentError( message:String )

Generates an illegal argument error

Throws a TIllegalArgumentException.


Function UnsupportedOperationError()

Generates an unsupported operation error

Throws a TUnsupportedOperationException.


Function InvalidOperationError( message:String )

Generates an invalid operation error

Throws a TInvalidOperationException.


Function DebugStop()

Stop program execution and enter debugger

If there is no debugger present, this command is ignored.

Example

'
' Run in debug mode
'
SuperStrict

Framework BRL.StandardIO


Graphics 640,480
Local a:Int

Repeat
    a = Rnd(20)
Until KeyDown(KEY_ESCAPE)
DebugStop


Function DebugLog( message:String )

Write a string to debug log

If there is no debugger present, this command is ignored.

Example

'
' Run in debug mode to see the output
'
SuperStrict

Framework BRL.StandardIO


DebugLog "My debug text"


Function MemAlloc:Byte Ptr( size:Size_T, collectable:Int = False )

Allocates memory

Allocates a new block of memory size bytes long. If collectable is False, the memory is not collectable and must be freed manually with MemFree. Otherwise, the memory is collectable and can either be freed with MemFree (with collectable set to True) or will be automatically freed by the garbage collector.

Returns

A new block of memory size bytes long


Function MemFree( mem:Byte Ptr, collectable:Int = False )

Free allocated memory

The memory specified by mem must have been previously allocated by MemAlloc or MemExtend. Note: If the memory was allocated with MemAlloc and collectable is True, collectable must be True when freeing the memory.


Function MemExtend:Byte Ptr( mem:Byte Ptr,size:Size_T,new_size:Size_T, collectable:Int = False )

Extend a block of memory

An existing block of memory specified by mem and size is copied into a new block of memory new_size bytes long. The existing block is released and the new block is returned.

Use collectable set to True if the memory you are extending was allocated with MemAlloc and collectable is True.

Returns

A new block of memory new_size bytes long


Function OnEnd( fun() )

Add a function to be called when the program ends

OnEnd allows you to specify a function to be called when the program ends. OnEnd functions are called in the reverse order to that in which they were added.

Example

' onend.bmx

SuperStrict

Framework BRL.StandardIO


Function cleanup()
    Print "cleaning up"
End Function

OnEnd cleanup
Print "program running"
End 'the cleanup function will be called at this time


Function ReadStdin:String()

Read a string from stdin

Returns

A string read from stdin. The newline terminator, if any, is included in the returned string.


Function WriteStdout( str:String )

Write a string to stdout

Writes str to stdout and flushes stdout.


Function WriteStderr( str:String )

Write a string to stderr

Writes str to stderr and flushes stderr.


Function Delay( millis:Int )

Wait for a given number of milliseconds

Delay suspends program execution for at least millis milliseconds.

A millisecond is one thousandth of a second.

Example

SuperStrict

Framework BRL.StandardIO


Print "This is a test line."

Delay 3000

Print "This line was printed 3000 milliseconds later."
Print "This program will end in 2000 milliseconds."

Delay 2000


Function UDelay( microseconds:Int )

Wait for a given number of microseconds

UDelay suspends program execution for at least microcseconds.

A microsecond is one millionth of a second.


Function MilliSecs:Int()

Get millisecond counter

MilliSecs returns the number of milliseconds elapsed since the computer was turned on.

A millisecond is one thousandth of a second.

Returns

Milliseconds since computer turned on.

Example

SuperStrict

Framework BRL.StandardIO


Local start:Int = MilliSecs()

Input("Type Anything >")

Print "You took "+(MilliSecs()-start)+" milliseconds to type that."


Function MemClear( mem:Byte Ptr,size:Size_T )

Clear a block of memory to 0


Function MemCopy( dst:Byte Ptr,src:Byte Ptr,size:Size_T )

Copy a non-overlapping block of memory


Function MemMove( dst:Byte Ptr,src:Byte Ptr,size:Size_T )

Copy a potentially overlapping block of memory


Function GCSetMode( Mode:Int )

Sets the garbage collector mode

mode can be one of the following:
1 : automatic GC - memory will be automatically garbage collected
2 : manual GC - no memory will be collected until a call to GCCollect is made

The default GC mode is automatic GC.


Function GCGetMode:Int()

Gets the garbage collector mode

mode can be one of the following:
1 : automatic GC - memory will be automatically garbage collected
2 : manual GC - no memory will be collected until a call to GCCollect is made

The default GC mode is automatic GC.


Function GCSuspend()

Suspend garbage collector

GCSuspend temporarily suspends the garbage collector. No garbage collection will be performed following a call to GCSuspend.

Use GCResume to resume the garbage collector. Note that GCSuspend and GCResume 'nest', meaning that each call to GCSuspend must be matched by a call to GCResume.


Function GCResume()

Resume garbage collector

GCResume resumes garbage collection following a call to GCSuspend.

See GCSuspend for more details.


Function GCCollect:Size_T()

Run garbage collector

This function will have no effect if the garbage collector has been suspended due to GCSuspend.

Returns

The amount of memory, in bytes, collected.


Function GCCollectALittle:Int()

Run garbage collector, collecting a little

This function will have no effect if the garbage collector has been suspended due to GCSuspend.

Returns

Returns 0 if there is no more to collect.


Function GCMemAlloced:Size_T()

Memory allocated by application

This function only returns 'managed memory'. This includes all objects, strings and arrays in use by the application.

Returns

The amount of memory, in bytes, currently allocated by the application


Function GCEnter()

Private: do not use


Function GCLeave()

Private: do not use


Function GCRetain(obj:Object)

Retains a reference to the specified Object, preventing it from being collected.


Function GCRelease(obj:Object)

Releases a reference from the specified Object.


Function GCThreadIsRegistered:Int()

Returns True if the current thread is registered with the garbage collector.


Function GCRegisterMyThread:Int()

Registers the current thread with the garbage collector.

Returns

0 on success, 1 if the thread was already registered, or -1 if threads are not supported.


Function GCUnregisterMyThread:Int()

Unregisters the previously registered current thread.

Note, that any memory allocated by the garbage collector from the current thread will no longer be accessible after the thread is unregistered.


Function GCGetStats(stats:SGCStats Var)

Retrieves GC statistics (various global counters), populating the provided SGCStats struct.


Function HandleFromObject:Size_T( obj:Object )

Convert object to integer handle

After converting an object to an integer handle, you must later release it using the Release command.

Returns

An integer object handle


Function HandleToObject:Object( handle:Size_T )

Convert integer handle to object

Returns

The object associated with the integer handle


Function ArrayCopy(src:Object, srcPos:Int, dst:Object, dstPos:Int, length:Int)

Copies an array from the specified src array, starting at the position srcPos, to the position dstPos of the destination array.


Function IsEmptyArray:Int(obj:Object)

Determines whether the Object obj is an empty array.

Returns

True if obj is an empty array, or False otherwise.


Function IsEmptyString:Int(obj:Object)

Determines whether the Object obj is an empty String.

Returns

True if obj is an empty String, or False otherwise.


Function ObjectIsString:Int(obj:Object)

Determines whether the Object obj is a String.

Returns

True if obj is a String, or False otherwise.


Function AtStart:Int(func(), priority:Int = 0)

Adds a function to the startup queue, optionally with a priority.

After all modules have been loaded, and before the main loop starts, the functions in the startup queue are called in order of priority, with higher priority functions being called first.


Globals

Global AppDir:String="bbAppDir"

Application directory

The AppDir global variable contains the fully qualified directory of the currently executing application. An application's initial current directory is also set to AppDir when an application starts.

In a compiled DLL, the AppDir global variable will instead contain the fully qualified directory of the DLL.

Example

' appdir.bmx
' requests the user to select a file from the application's directory

SuperStrict

Framework BRL.StandardIO


Print "Application Directory="+AppDir

Local file:String = RequestFile("Select File to Open","",False,AppDir)

Print "file selected was :"+file


Global AppFile:String="bbAppFile"

Application file name

The AppFile global variable contains the fully qualified file name of the currently executing application.

In a compiled DLL, the AppFile global variable will instead contain the fully qualified file name of the DLL.

Example

' appfile.bmx

SuperStrict

Framework BRL.StandardIO


Print "This program's executable is located at "+AppFile


Global AppTitle:String="bbAppTitle"

Application title

The AppTitle global variable is used by various commands when a default application title is required - for example, when opening simple windows or requesters.

Initially, AppTitle is set to the value "BlitzMax Application". However, you may change AppTitle at any time with a simple assignment.

Example

'Apptitle Example

SuperStrict

Framework BRL.StandardIO


AppTitle = "Just a TITLE"
Graphics 400, 400

Repeat
    DrawText "Hello World", 10, 20
    Flip
Until AppTerminate()


Global AppArgs:String[]="bbAppArgs"

Arguments passed to the application at startup

The AppArgs global array contains the command line parameters sent to an application when it was started. The first element of AppArgs always contains the name of the application. However, the format of the name may change depending on how the application was launched. Use AppDir or AppFile for consistent information about the applications name or directory.

Example

' appargs.bmx
' print the command line arguments passed to the program at runtime

SuperStrict

Framework BRL.StandardIO


Print "Number of arguments = "+AppArgs.length

For Local a:String = EachIn AppArgs
    Print a
Next


Global LaunchDir:String="bbLaunchDir"

Directory from which application was launched

The LaunchDir global variable contains the current directory at the time the application was launched. This is mostly of use to command line tools which may need to access the 'shell' current directory as opposed to the application directory.

Example

' launchdir.bmx

SuperStrict

Framework BRL.StandardIO


Print "This program was launched from "+LaunchDir$


Consts

Const CHARSFORMAT_SCIENTIFIC:ULong = 1 Shl 0

Enables parsing of scientific notation in extended string to number conversion methods.


Const CHARSFORMAT_FIXED:ULong = 1 Shl 2

Enables parsing of fixed point notation in extended string to number conversion methods.


Const CHARSFORMAT_HEX:ULong = 1 Shl 3

Enables parsing of hexadecimal notation in extended string to number conversion methods.


Const CHARSFORMAT_NOINFNAN:ULong = 1 Shl 4

Do not allow Infinity or NaN in extended string to number conversion methods.


Const CHARSFORMAT_JSON:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC | CHARSFORMAT_NOINFNAN

Enforces JSON number format in extended string to number conversion methods.


Const CHARSFORMAT_JSONORINFNAN:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC

Parses JSON number format or Infinity or NaN in extended string to number conversion methods.


Const CHARSFORMAT_FORTRAN:ULong = 1 Shl 6 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC

Allows parsing of Fortran-style numbers in extended string to number conversion methods.


Const CHARSFORMAT_GENERAL:ULong = CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC

The default format for extended string to number conversion methods.


Const CHARSFORMAT_ALLOWLEADINGPLUS:ULong = 1 Shl 7

Allows leading plus sign in extended string to number conversion methods.


Const CHARSFORMAT_SKIPWHITESPACE:ULong = 1 Shl 8

Enables skipping leading whitespace in extended string to number conversion methods.


Keywords

Abstract

Denote a class, function or method as abstract

Example

Rem
A BlitzMax type that contains Abstract methods becomes abstract itself.
Abstract types are used to define interfaces that extending types must 
implement before they can be used to create new instances.

In the following code TShape is an abstract type in that you can not
create a TShape but anything extending a TShape must implement a Draw()
method.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TShape
    Field xpos:Int,ypos:Int
    Method Draw() Abstract
End Type

Type TCircle Extends TShape
    Field radius:Int
    
    Function Create:TCircle(x:Int,y:Int,r:Int)
        Local c:TCircle = New TCircle
        c.xpos=x;c.ypos=y;c.radius=r
        Return c
    End Function
    
    Method Draw()
        DrawOval xpos,ypos,radius,radius
    End Method
End Type

Type TRect Extends TShape
    Field width:Int,height:Int
    
    Function Create:TRect(x:Int,y:Int,w:Int,h:Int)
        Local r:TRect = New TRect
        r.xpos=x;r.ypos=y;r.width=w;r.height=h
        Return r
    End Function
    
    Method Draw()
        DrawRect xpos,ypos,width,height
    End Method
End Type

Local shapelist:TShape[4]
Local shape:TShape

shapelist[0]=TCircle.Create(200,50,50)
shapelist[1]=TRect.Create(300,50,40,40)
shapelist[2]=TCircle.Create(400,50,50)
shapelist[3]=TRect.Create(200,180,250,20)

Graphics 640,480
While Not KeyHit(KEY_ESCAPE)
    Cls
    For shape=EachIn shapelist
        shape.draw
    Next
    Flip
Wend
End


And

Conditional 'And' binary operator

Example

Rem
And is a boolean operator that performs the AND function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 10
    If i>3 And i<6 Print "!" Else Print i
Next


Asc

Get character value of the first character of a string

Example

Rem
Asc returns the unicode value of the first character of a string.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Asc("A")  '65
Print "A"[0]    '65 - equivalent index style implementation


Assert

Throw a RuntimeError if a condition is false

Example

Rem
Assert generates a BlitzMax runtime error if the specified condition is false.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:TImage = LoadImage("nonexistant image file")
Assert a,"Image Failed to Load"


Byte

Unsigned 8 bit integer type

Example

Rem
Byte is an unsigned 8 bit integer BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Byte

a=512;Print "a="+a  'prints 0
a=-1;Print "a="+a   'prints 255


Case

Conditional code inside a Select block

Example

' case.bmx

' Case performs a comparison with the preceeding value(s) and that
' listed in the enclosing Select statement:

SuperStrict

Framework BRL.StandardIO


Local a:Int=Int( Input("Enter a number between 1 and 5 ") )

Select a
    Case 1 Print "You think small"
    Case 2 Print "You are even tempered"
    Case 3,4 Print "You are middle of the road" 
    Case 5 Print "You think big"
    Default Print "You are unable to follow instructions"
End Select


Catch

Catch an exception object in a Try block

Example

Rem
Catch defines an exception handler following a Try..EndTry Block.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int
Try
    Repeat
        a:+1
        Print a
        If a>20 Throw "chunks"
    Forever
Catch e:String
    Print "caught exception "+e
EndTry


Chr

Create a string of length 1 with a character code

Example

Rem
Chr returns a String of length 1 containing the unicode character of the value.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Chr(65)   'A


Const

Declare a constant

Example

Rem
Const defines the preceeding variable declaration as constant.
End Rem

SuperStrict

Framework BRL.StandardIO


Const ON:Int=True
Const OFF:Int=False

Const TWOPI:Float=2*Pi

Print TWOPI


Continue

Continue execution of enclosing loop

Example

Rem
Continue causes program flow to return to the start of the enclosing While, Repeat or For program loop
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 20
    If i Mod 2 Continue
    Print i
Next


Default

Default code inside a Select block

Example

Rem
Default is used in a Select block to mark a code section that is executed if all prior Case statements fail.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:String = Input("What is your favorite color?")
a=Lower(a)  'make sure the answer is lower case

Select a
    Case "yellow" Print "You a bright and breezy"
    Case "blue" Print "You are a typical boy"
    Case "pink" Print "You are a typical girl"
    Default Print "You are quite unique!"
End Select


DefData

Define classic BASIC style data

Example

' defdata.bmx

SuperStrict

Framework BRL.StandardIO


Local name:String
Local age:Int, skill:Int

ReadData name
ReadData age,skill

Print "name="+name+" age="+age+" skill="+skill

DefData "Simon",37,5000


Delete

Specify a custom finalizer

Example

Rem
Reserved for future expansions.
End Rem


Double

64 bit floating point type

Example

Rem
Double is a 64 bit floating point BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local speedoflight:Double
Local distance:Double
Local seconds:Double

speedoflight=299792458:Double   'meters per second
distance=149597890000:Double    'average distance in meters from earth sun

seconds=distance/speedoflight

Print "Number of seconds for light to travel from earth to sun="+seconds


Double128

128 bit floating point intrinsic type

Only available on x64.


EachIn

Iterate through an array or collection

Example

Rem
Specifies a BlitzMax collection type whose values are assigned sequentially to the For iterator.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int[]=[0,5,12,13,20]

For Local b:Int = EachIn a
    Print b
Next


Else

Else provides the ability for an If-Then construct to execute a second block of code when the If condition is false.

Example

Rem
Else provides the ability for an If Then construct to execute a second block of code when the If condition is false.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int = 3

If i<5 Print "i<5" Else Print "i>=5"    ' single line If Else

If i<5          'block style If Else
    Print "i<5"
Else
    Print "i>=5"
EndIf


ElseIf

ElseIf provides the ability to test and execute a section of code if the initial condition failed.

Example

Rem
ElseIf provides the ability to test and execute a section of code if the initial condition failed.
End Rem

SuperStrict

Framework BRL.StandardIO


Local age:Int = Int( Input("How old Are You?") )

If age<13
    Print "You are young"
ElseIf age<20
    Print "You are a teen!"
Else
    Print "You are neither young nor a teen"
EndIf


End

End program execution

Example

Rem
The End command causes a program to exit immediately.
End Rem

SuperStrict

Framework BRL.StandardIO


Print "Hello!"
End
Print "This line will never be printed as the program has already been ended."


EndEnum

End an enumeration declaration


EndExtern

End an Extern section

Example

Rem
EndExtern marks the end of an Extern section.
End Rem

SuperStrict

Framework BRL.StandardIO


Extern 
    Function puts( str$z )
End Extern

puts "Using clib's put string!"


EndFunction

End a function declaration

Example

Rem
Function marks the end of a BlitzMax function declaration.
End Rem

SuperStrict

Framework BRL.StandardIO


Function RandomName:String()
    Local a:String[]=["Bob","Joe","Bill"]
    Return a[Rnd(Len a)]
End Function

For Local i:Int = 1 To 5
    Print RandomName$()
Next


EndIf

Marks the End of an If-Then construct.

Example

Rem
EndIf marks the end of an If Then block.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int = 5

If i<10
    Print "i<10"
EndIf


EndInterface

End a user defined interface declaration


EndMethod

End a method declaration

Example

Rem
EndMethod marks the end of a BlitzMax Method declaration.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TPoint
    Field x:Int,y:Int

    Method ToString:String()
        Return x+","+y
    End Method
End Type

Local p:TPoint = New TPoint
Print p.ToString()


EndRem

End a remark block

Example

Rem
All code between Rem and EndRem is ignored by the BlitzMax compiler.
Print "hello"
End Rem

SuperStrict

Framework BRL.StandardIO


Print "goodbye"


EndSelect

End a Select block

Example

Rem
EndSelect marks the end of a Select block.
End Rem

SuperStrict

Framework BRL.StandardIO

SeedRnd MilliSecs()

Local a:Int = Rand(5)

Select a
    Case 1 Print "one"
    Case 2 Print "two"
    Case 3 Print "three"
    Case 4 Print "four"
    Case 5 Print "five"
    Default Print "Program Error"
End Select


EndStruct

End a user defined structure declaration


EndTry

End declaration of a Try block

Example

Rem
EndTry
EndTry marks the end of a Try block.
End Rem


EndType

End a user defined class declaration

Example

Rem
EndType marks the end of a BlitzMax custom type.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TVector
    Field x:Int,y:Int,z:Int
End Type

Local a:TVector=New TVector

a.x=10
a.y=20
a.z=30


EndWhile

End a While block

Example

SuperStrict

Framework BRL.StandardIO


Local i:Int=0

While i < 5
  Print i
  i :+ 1
EndWhile  'can also use Wend


Enum

Begin an enumeration declaration


Exit

Exit enclosing loop

Example

Rem
Exit causes program flow to exit the enclosing While, Repeat or For loop.
End Rem

SuperStrict

Framework BRL.StandardIO


Local n:Int
Repeat
    Print n
    n:+1
    If n=5 Exit
Forever


Export

Denote a function for export to a shared library. The generated function name will not be mangled.


Extends

Specify supertype(s) of a user defined type

Example

Rem
Extends is used in a BlitzMax Type declaration to derive the Type from a specified base class.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TShape
    Field xpos:Int,ypos:Int
    Method Draw() Abstract
End Type

Type TCircle Extends TShape
    Field radius:Int
    
    Function Create:TCircle(x:Int,y:Int,r:Int)
        Local c:TCircle=New TCircle
        c.xpos=x;c.ypos=y;c.radius=r
        Return c
    End Function
    
    Method Draw()
        DrawOval xpos,ypos,radius,radius
    End Method
End Type

Type TRect Extends TShape
    Field width:Int,height:Int
    
    Function Create:TRect(x:Int,y:Int,w:Int,h:Int)
        Local r:TRect=New TRect
        r.xpos=x;r.ypos=y;r.width=w;r.height=h
        Return r
    End Function
    
    Method Draw()
        DrawRect xpos,ypos,width,height
    End Method
End Type

Local shapelist:TShape[4]
Local shape:TShape

shapelist[0]=TCircle.Create(200,50,50)
shapelist[1]=TRect.Create(300,50,40,40)
shapelist[2]=TCircle.Create(400,50,50)
shapelist[3]=TRect.Create(200,180,250,20)

Graphics 640,480
While Not KeyHit(KEY_ESCAPE)
    Cls
    For shape=EachIn shapelist
        shape.draw
    Next
    Flip
Wend
End


Extern

Begin an Extern section (a list of imported external declarations)

Example

Rem
Extern marks the beginning of an external list of function declarations.
End Rem

SuperStrict

Framework BRL.StandardIO


Extern 
    Function puts( str$z )
    Function my_puts( str$z )="puts"
End Extern

puts "Using clib's put string!"
my_puts "Also using clib's put string!"


False

Constant integer of value 0

Example

Rem
False is a Constant Integer assigned the value 0.
End Rem

SuperStrict

Framework BRL.StandardIO


Print "False="+False

If False
    Print "This code will never be executed"
EndIf


Field

Declare a field variable

Example

Rem
Field is used to declare the member variable(s) of a type.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TVector
    Field   x:Int,y:Int,z:Int
End Type

Local a:TVector=New TVector

a.x=10
a.y=20
a.z=30


FieldOffset

Returns the offset in bytes for a field of the specified Type or Struct.


Final

Denote a class, function or method as final

Example

Rem
Final stops methods from being redefined in super classes.
End Rem

SuperStrict

Framework BRL.StandardIO


Type T1
    Method ToString:String() Final
        Return "T1"
    End Method
End Type

Type T2 Extends T1
    Method ToString:String()    'compile time error "Final methods cannot be overridden"
        Return "T2"
    End Method
End Type


Finally

Execute a block of code upon exiting a Try or Catch block


Float

32 bit floating point type

Example

Rem
Float is a 32 bit floating point BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Float

a=1

For Local i:Int = 1 To 8
    Print a
    a=a*0.1
Next

For Local i:Int = 1 To 8
    a=a*10
    Print a
Next


Float128

128 bit floating point intrinsic type

Only available on x64.


Float64

64 bit floating point intrinsic type

Only available on x64.


For

Marks the start of a loop that uses an iterator to execute a section of code repeatedly.

Example

Rem
For marks the start of a loop that uses an iterator to execute a section of code repeatedly.
End Rem

' print 5 times table

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 12
    Print "5*"+i+"="+5*i
Next


Forever

Continue a Repeat block forever

Example

Rem
Forever is an alternate ending to a Repeat block that will cause the loop to always repeat.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int
Repeat
    Print i+" Ctrl-C to End!" 
    i:+1
Forever


Framework

Framework builds the BlitzMax application with only the module(s) specified rather than the standard set of modules.

Example

' Use the Framework and Import functions to only include the function sets
' that you want to use
'
SuperStrict

Framework Brl.standardio ' so we can use print
Import Brl.random ' so we can use the Rnd Function

Print Rnd(255)


Function

Begin a function declaration

Example

Rem
Function marks the beginning of a BlitzMax function declaration.

When a function does not return a value the use of brackets when
calling the function is optional.
End Rem

SuperStrict

Framework BRL.StandardIO


Function NextArg(a:String)
    Local p:Int
    p=Instr(a,",")
    If p 
        NextArg a[p..]
        Print a[..p-1]
    Else
        Print a
    EndIf
End Function

NextArg("one,two,three,four")

NextArg "22,25,20"  'look ma, no brackets


Global

Declare a global variable

Example

Rem
Global defines a variable as Global allowing it be accessed from within Methods and Functions.
End Rem

SuperStrict

Framework BRL.StandardIO


Global a:Int = 20

Function TestGlobal()
    Print "a="+a
End Function

TestGlobal
Print "a="+a


If

Begin a conditional block.

Example

Rem
If begins a conditional block.
End Rem

SuperStrict

Framework BRL.StandardIO


If 3<5 Print "3<5"  'single line if

If 5<7              'if block
    Print "5<7"
EndIf


Implements

Specify implemented interface(s) of a user defined type


Import

Import declarations from a module or source file

Example

Rem
:Import specifies the external BlitzMax modules and source files used by the program.
End Rem

SuperStrict

Framework BRL.GlMax2D

Import BRL.System

Graphics 640,480,32

While Not KeyHit(KEY_ESCAPE)
    Cls
    DrawText "Minimal 2D App!",0,0
    Flip
Wend


Incbin

Embed a data file

Example

Rem
IncBin embeds an external data file in a BlitzMax program that can 
then be read using the "incbin::" device name.
End Rem

' code snippet from demos/firepaint/firepaint.bmx

SuperStrict

Framework BRL.StandardIO


Incbin "stars.png"

Local stars:TImage = LoadImage( "incbin::stars.png" )


IncbinLen

Get length of embedded data file

Example

Rem
IncBinLen returns the size in bytes of the specified embedded binary file.
End Rem

SuperStrict

Framework BRL.StandardIO


Incbin "incbinlen.bmx"

Local p:Byte Ptr = IncbinPtr("incbinlen.bmx")
Local bytes:Int = IncbinLen("incbinlen.bmx")

Local s:String=String.FromBytes(p,bytes)

Print "StringFromBytes(p,bytes)="+s


IncbinPtr

Get start address of embedded data file

Example

Rem
IncBinPtr returns a byte pointer to the specified embedded binary file.
End Rem

SuperStrict

Framework BRL.StandardIO


Incbin "incbinptr.bmx"

Local p:Byte Ptr = IncbinPtr("incbinptr.bmx")
Local bytes:Int = IncbinLen("incbinptr.bmx")

Local s:String = String.FromBytes(p,bytes)

Print "StringFromBytes(p,bytes)="+s


Include

Include effectively 'inserts' the specified file into the file being compiled.


Inline

Marks a global function as inline which replaces the function call with the actual code of the function for less overhead.


Int

Signed 32 bit integer type

Example

Rem
Int is a signed 32 bit integer BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int

' the following values all print 0 as BlitzMax "rounds to zero"
' when converting from floating point to integer

a=0.1;Print a
a=0.9;Print a
a=-0.1;Print a
a=-0.9;Print a


Int128

128 bit integer intrinsic type

Only available on x64.


Interface

Begin a user defined interface declaration


Len

Number of characters in a string or elements in an array

Example

Rem
Len is a BlitzMax operator that returns the number of elements in a container Type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:String = "BlitzMax Rocks"
Print Len a 'prints 14

Local b:Int[]
Print Len b     'prints 0

b=New Int[20]
Print Len b     'prints 20


Local

Declare a local variable

Example

Rem
Local defines a variable as local to the Method or Function it is defined meaning it is automatically released when the function returns.
End Rem

SuperStrict

Framework BRL.StandardIO


Function TestLocal()
    Local a:Int
    a=20
    Print "a="+a
    Return
End Function

TestLocal
Print "a="+a    'prints an error as a is only local to the TestLocal function


Long

Signed 64 bit integer type

Example

Rem
Long is a signed 64 bit integer BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Const MAXLONG:Long=$7fffffffffffffff:Long
Const MINLONG:Long=$8000000000000000:Long

Print "A long can have the maximum value of:"+MAXLONG
Print "A long can have the minimum value of:"+MINLONG


LongInt

Signed 32/64 bit integer type depending on platform


LParam

Signed 32/64 bit LPARAM WinAPI type

Only available on Windows.


Method

Begin a method declaration

Example

Rem
Method marks the beginning of a BlitzMax custom type member function.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TPoint
    Field x:Int,y:Int

    Method ToString:String()
        Return x+","+y
    End Method
End Type

Local a:TPoint=New TPoint
Print a.ToString()


Mod

Numeric 'modulus' or 'remainder' binary operator

Example

Rem
Mod is a mathematical operator that performs the Modulo function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 6 To -6 Step -1
    Print i+" Mod 3="+(i Mod 3)
Next


Module

Declare module scope and identifier

See the BlitzMax Language Reference for more information on BlitzMax Modules.

Example

Rem
The Module keyword advises the BlitzMax program maker BMK to create a code 
module from the source file.
End Rem

SuperStrict

Framework BRL.StandardIO


Module PUB.Sequencer

ModuleInfo "Framework: Audio Sequencer for use with FreeAudio"
ModuleInfo "Copyright: Blitz Research Ltd"
ModuleInfo "Author: Simon Armstrong"
ModuleInfo "Version: 1.00"


ModuleInfo

Define module properties

Example

Rem
ModuleInfo allows properties such as Author and Copyright to be included in a module file.
End Rem

SuperStrict

Framework BRL.StandardIO


Module PUB.Sequencer

ModuleInfo "Framework: Audio Sequencer for use with FreeAudio"
ModuleInfo "Copyright: Blitz Research Ltd"
ModuleInfo "Author: Simon Armstrong"
ModuleInfo "Version: 1.00"


New

Create an instance of a user defined type, or specify a custom constructor

Example

Rem
New creates a BlitzMax variable of the Type specified.
End Rem

SuperStrict

Framework BRL.StandardIO


Type MyType
    Field a:Int,b:Int,c:Int
End Type

Local t:MyType
t=New MyType
t.a=20

Print t.a

' if a new method is defined for the type it will also be called

Type MyClass
    Field a:Int,b:Int,c:Int
    Method New()
        Print "Constructor invoked!"
        a=10
    End Method
    
    ' the new method can be overridden to provide even more construction options
    Method New(b:Int, c:Int)
        New() ' the default new can also be called from inside this one
        Self.b = b
        Self.c = c
    End Method
End Type

Local c:MyClass
c=New MyClass
Print c.a

c = New MyClass(5, 15)
Print c.a
Print c.b
Print c.c


Next

End a For block

Example

Rem
Marks the end of a For section.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 5
    Print i
Next


Not

Conditional 'Not' binary operator

Example

Rem
Not is a boolean unary operator that performs the NOT function.
End Rem

SuperStrict

Framework BRL.StandardIO


Print Not 0         'prints 1 (TRUE)
Print Not 20        'prints 0 (FALSE)


Null

Get Null value (default value for types)

Example

Rem
Null is a BlitzMax Constant representing an empty Object reference.
End Rem

SuperStrict

Framework BRL.StandardIO


Type mytype
    Field atypevariable:Int
End Type

Global a:mytype

If a=Null Print "a is uninitialized"
a=New mytype
If a<>Null Print "a is initialized"


Object

Object type

Example

Rem
Object is the base class of all BlitzMax types.

The following function attempts to cast from any object to
the custom type TImage and returns true if the given object
is an instance of TImage or an instance of a &Type derived
from TImage.
End Rem

SuperStrict

Framework BRL.StandardIO


Function IsImage(obj:Object)
    If TImage(obj) Return True
    Return False
End Function


Or

Conditional 'Or' binary operator

Example

Rem
Or is a boolean operator that performs the OR function.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 5
    If i=2 Or i=4 Print "!" Else Print i
Next


Override

Indicates that a method declaration is intended to override a method declaration in a supertype.

Use of Override on a method that does not override a method will result in a compilation error.


Pi

Constant pi value: 3.1415926535897932384626433832795

Example

Rem
Pi is a Constant Double assigned the value 3.1415926535897932384626433832795
End Rem

SuperStrict

Framework BRL.StandardIO


Print "Pi="+Pi


Private

Make types, constants, global variables, functions or type members only accessible from within the current source file.

Example

Rem
Private makes a variable, function or method only accessible from within the 
current source file.
End Rem

SuperStrict

Framework BRL.StandardIO


Public

Global Score:Int,Lives:Int,Health:Int

Private

Global posx:Int,posy:Int,posz:Int


Protected

Make type members only accessible from within the current source file and within subtypes.

Example

Rem
Protected
Protected makes a variable, function or method only accessible from within the current source file.
End Rem


Ptr

Composite type specifier for pointer types

Example

Rem
Ptr is a composite type containing a pointer to a variable of the specified Type.
End Rem

' the following illustrates the use of traditional c style pointers

SuperStrict

Framework BRL.StandardIO


Local c:Int[]=[1,2,3,4]
Local p:Int Ptr

p=c
Print "pointer 'p' points to:"+p[0] '1

p:+1
Print "pointer 'p' points to:"+p[0] '2

p:+1
Print "pointer 'p' points to:"+p[0] '3

p:+1
Print "pointer 'p' points to:"+p[0] '4


Public

Make types, constants, global variables, functions or type members accessible from outside the current source file (default)

Example

Rem
Public makes a variable, function or method accessible from outside the current source file (default).
End Rem

SuperStrict

Framework BRL.StandardIO


Public

Global Score:Int,Lives:Int,Health:Int

Private

Global posx:Int,posy:Int,posz:Int


ReadData

Read classic BASIC style data


ReadOnly

Denote a field as read only, where the value may only be set in its declaration or in the type constructor


Release

Release an integer object handle

Example

Rem
Release removes the internal reference caused by creating an integer handle to a type.
End Rem

Type MyType
    Field bigmap[1024*1024]
End Type

GCCollect
Print GCMemAlloced()

a=New MyType
GCCollect
Print GCMemAlloced()

Release a
GCCollect
Print GCMemAlloced()


Rem

Begin a remark block

Example

Rem

My Rem Example
First created 9th August, 2004

(C)2050 Blitz Intergalactic Software Corporation

End Rem

SuperStrict

Framework BRL.StandardIO


Print "This program has no useful function"

Rem

Remarks are useful for making your program easily readable.
You can leave details explaining the function of your program
in a remarks section so that you and any other programmers
that work with your code can more easily understand the workings
of your program

End Rem

Print "Sorry."
End


Repeat

Execute a block of code until a termination condition is met, or forever

Example

Rem
Repeat executes the following section of code until a terminating condition is true.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int

Repeat
    Print i
    i:+1
Until i=5


RestoreData

Restore classic BASIC style data

Example

' restoredata.bmx

SuperStrict

Framework BRL.StandardIO


Local name:String, age:Int, skill:Int

For Local i:Int = 1 To 5
    RestoreData mydata  'reset the data pointer everly loop so we don't read past the end
    ReadData name,age,skill
    Print "name="+name+" age="+age+" skill="+skill
Next

#mydata 'program label that can be used with the RestoreData command

DefData "Simon",37,5000


Return

Return from a method or function

Example

Rem
Return exits a BlitzMax function or method with an optional value.
The type of return value is dictated by the type of the function.
End Rem

SuperStrict

Framework BRL.StandardIO


Function CrossProduct:Float(x0:Float,y0:Float,z0:Float,x1:Float,y1:Float,z1:Float)
    Return x0*x1+y0*y1+z0*z1
End Function

Print "(0,1,2)x(2,3,4)="+CrossProduct(0,1,2,2,3,4)

Function LongRand:Long()
    Return (Rand($80000000,$7fffffff) Shl 32)|(Rand($80000000,$7fffffff))
End Function

Print "LongRand()="+LongRand()
Print "LongRand()="+LongRand()


Sar

Bitwise 'Shift arithmetic right' binary operator

Example

Rem
Sar is a binary operator that performs the arithmetic shift to right function.
End Rem

SuperStrict

Framework BRL.StandardIO


Local b:Int = $f0f0f0f0
For Local i:Int = 1 To 32
    Print Bin(b)
    b=b Sar 1
Next


Select

Begin a Select block

Example

Rem
Select begins a block featuring a sequence of multiple comparisons with a single value.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int = Int( Input("Enter Your Country Code ") )

Select a
    Case 1
        Print "You are from America"
    Case 44
        Print "You are from the United Kingdom"
    Case 62
        Print "You are from Australia"
    Case 64
        Print "You are from New Zealand"
    Default
        Print "I cannot tell which country you are from"
End Select


Self

Reference to this method's type instance

Example

Rem
Self is used in BlitzMax Methods to reference the invoking variable.
End Rem

SuperStrict

Framework BRL.StandardIO


Type MyClass
    Global count:Int
    Field id:Int
    
    Method New()
        id=count
        count:+1
        ClassList.AddLast(Self) 'adds this new instance to a global list        
    End Method
End Type

Global ClassList:TList

classlist=New TList

Local c:MyClass

c=New MyClass
c=New MyClass
c=New MyClass

For c=EachIn ClassList
    Print c.id
Next


Shl

Bitwise 'Shift left' binary operator

Example

Rem
Shl is a binary operator that performs the shift to left function.
End Rem

SuperStrict

Framework BRL.StandardIO


Local b:Int = 1
For Local i:Int = 1 To 32
    Print Bin(b)
    b=b Shl 1
Next


Short

Unsigned 16 bit integer type

Example

Rem
Short is an unsigned 16 bit integer BlitzMax primitive type.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Short

a=65536;Print "a="+a    'prints 0
a=-1;Print "a="+a   'prints 65535


Shr

Bitwise 'Shift right' binary operator

Example

Rem
Shr is a binary operator that performs the shift to right function.
End Rem

SuperStrict

Framework BRL.StandardIO


Local b:Int = -1
For Local i:Int = 1 To 32
    Print Bin(b)
    b=b Shr 1
Next


Size_T

Unsigned 32/64 bit integer type


SizeOf

Size, in bytes, occupied by a variable, string, array or object

Example

Rem
SizeOf returns the number of bytes of system memory used to store the variable.
End Rem

SuperStrict

Framework BRL.StandardIO


Type MyType
    Field a:Int,b:Int,c:Int
End Type

Local t:MyType
Print SizeOf t  'prints 12

Local f!
Print SizeOf f  'prints 8

Local i:Int
Print SizeOf i  'prints 4

Local b:Byte
Print SizeOf b  'prints 1

Local a:String="Hello World"
Print SizeOf a  'prints 22 (unicode characters take 2 bytes each)


StackAlloc

Allocates memory from the stack.

This memory is automatically freed on leaving the function where it was created. It should not be freed, or returned from the function.


StaticArray

Denotes an array as a static array, with its content allocated on the stack.


Step

Specifies an optional constant that is used to increment the For iterator.

Example

Rem
Specifies an optional constant that is used to increment the For iterator.
End Rem

' count backwards from 10 to 0

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 10 To 0 Step -1
    Print i
Next


Strict

Set Strict mode (default in BlitzMax-NG)

See the BlitzMax Language Reference for more information on Strict mode programming.

Example

Rem
Strict advises the BlitzMax compiler to report as errors all auto defined variables.
End Rem

Strict

local a=10

b=20    'compiler error, strict mode means variables must be declared b4 use


String

String type

Example

Rem
String is a BlitzMax container type containing a sequence of unicode characters.
End Rem

SuperStrict

Framework BRL.StandardIO


Local quote:String=Chr(34)
Print quote+"Hello World!"+quote


Struct

Begin a user defined structure declaration


Super

Reference to the super type instance

Example

Rem
Super evaluates to Self cast to the method's immediate base class.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TypeA
    Method Report()
        Print "TypeA reporting"
    End Method
End Type

Type TypeB Extends TypeA
    Method Report()
        Print "TypeB Reporting"
        Super.Report()
    End Method
End Type

Local b:TypeB=New TypeB
b.Report()


SuperStrict

Set SuperStrict mode


Then

Optional separator between the condition and associated code in an If statement.

Example

Rem
Then is an optional separator between the condition and the block of code following an If statement.
End Rem

SuperStrict

Framework BRL.StandardIO


If 3<5 Then Print "3<5"


ThreadedGlobal

Declare a threaded global variable

Each thread will have its own copy of the variable - any changes to the variable will be visible only within the thread the change was made.


Throw

Throw an exception object to the enclosing Try block

Example

Rem
Throw generates a BlitzMax exception.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int
Try
    Repeat
        a:+1
        Print a
        If a>20 Throw "chunks"
    Forever
Catch e:String
    Print "caught exception "+e
EndTry


To

Followed by a constant which is used to calculate when to exit a For..Next loop.

Example

Rem
Followed by a constant which is used to calculate when to exit a For..Next loop.
End Rem

SuperStrict

Framework BRL.StandardIO


For Local i:Int = 1 To 5
    Print i
Next


True

Constant integer of value 1

Example

Rem
True is a Constant Integer assigned the value 1.
End Rem

SuperStrict

Framework BRL.StandardIO


Print "True="+True

If True
    Print "This line will always be executed"
EndIf

If Not True
    Print "This line will never be executed"
EndIf


Try

Begin declaration of a Try block

Example

Rem
Begin declaration of a Try block.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int

Try
    Repeat
        a:+1
        Print a
        If a>20 Throw "chunks"
    Forever
Catch e:String
    Print "caught exception "+e
EndTry


Type

Begin a user defined class declaration

Example

Rem
Type marks the beginning of a BlitzMax custom type.

Standard BlitzMax types use a preceeding "T" naming
convention to differentiate themselves from standard
BlitzMax variable names.
End Rem

SuperStrict

Framework BRL.StandardIO


Type TVector
    Field x:Int,y:Int,z:Int
End Type

Local a:TVector=New TVector

a.x=10
a.y=20
a.z=30


UInt

Unsigned 32 bit integer type


ULong

Unsigned 64 bit integer type


ULongInt

Unsigned 32/64 bit integer type depending on platform


Until

Conditionally continue a Repeat block

Example

Rem
Until marks the end of a Repeat block and is followed by a terminating condition.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int = 2
Repeat
    Print i
    i:*2
Until i>1000000


Using

Use a resource that implements the ICloseable interface

The Close method of an ICloseable object is automatically called when exiting the Using block.

Example

Rem
Using provides a mechanism to ensure that resources implementing
the ICloseable interface are properly closed after use.
End Rem

SuperStrict

Framework BRL.StandardIO

Using
    Local closeable:TCloseableExample = New TCloseableExample
Do
    ' Use the resource here
    closeable.DoSomething()
End Using

Type TCloseableExample Implements ICloseable

    Method DoSomething()
        Print "Doing something"
    End Method

    Method Close()
        Print "Resource closed"
    End Method

End Type


Var

Composite type specifier for 'by reference' types

Example

Rem
Var is a composite type containing a reference to a variable of the 
specified Type.
End Rem

SuperStrict

Framework BRL.StandardIO


' the following illustrates parsing function parameters by reference

Function ReturnMultiplevalues(a:Int Var,b:Int Var,c:Int Var)
    a=10
    b=20
    c=30
    Return
End Function

Local x:Int,y:Int,z:Int

ReturnMultipleValues(x,y,z)

Print "x="+x    '10
Print "y="+y    '20
Print "z="+z    '30


Varptr

Find the address of a variable

Example

Rem
Varptr returns the address of a variable in system memory.
End Rem

SuperStrict

Framework BRL.StandardIO


Local a:Int
Local p:Int Ptr

a=20
p=Varptr a
Print p[0]


Wend

End a While block

Example

Rem
Wend marks the end of a While section.
End Rem

SuperStrict

Framework BRL.StandardIO


Local i:Int

While i<5
    Print i
    i:+1
Wend


Where

Specify constraints on the types that can be used as arguments for a type parameter defined in a generic declaration


While

Execute a block of code while a condition is true

Example

Rem
While executes the following section of code repeatedly while a given condition is true.
End Rem

SuperStrict

Framework BRL.StandardIO


Graphics 640,480
While Not KeyHit(KEY_ESCAPE)    'loop until escape key is pressed
    Cls
    For Local i:Int = 1 To 200
        DrawLine Rnd(640),Rnd(480),Rnd(640),Rnd(480)
    Next
    Flip
Wend


WParam

Unsigned 32/64 bit WPARAM WinAPI type

Only available on Windows.


← TBase64TArrayBoundsException →
  • Types
  • Interfaces
  • Structs
  • Functions
    • Function Max:Int(a:Int, b:Int) Inline
    • Function Max:Long(a:Long, b:Long) Inline
    • Function Max:Float(a:Float, b:Float) Inline
    • Function Max:Double(a:Double, b:Double) Inline
    • Function Max:Byte(a:Byte, b:Byte) Inline
    • Function Max:Short(a:Short, b:Short) Inline
    • Function Max:UInt(a:UInt, b:UInt) Inline
    • Function Max:ULong(a:ULong, b:ULong) Inline
    • Function Max:Size_T(a:Size_T, b:Size_T) Inline
    • Function Max:LongInt(a:LongInt, b:LongInt) Inline
    • Function Max:ULongInt(a:ULongInt, b:ULongInt) Inline
    • Function Min:Int(a:Int, b:Int) Inline
    • Function Min:Long(a:Long, b:Long) Inline
    • Function Min:Float(a:Float, b:Float) Inline
    • Function Min:Double(a:Double, b:Double) Inline
    • Function Min:Byte(a:Byte, b:Byte) Inline
    • Function Min:Short(a:Short, b:Short) Inline
    • Function Min:UInt(a:UInt, b:UInt) Inline
    • Function Min:ULong(a:ULong, b:ULong) Inline
    • Function Min:Size_T(a:Size_T, b:Size_T) Inline
    • Function Min:LongInt(a:LongInt, b:LongInt) Inline
    • Function Min:ULongInt(a:ULongInt, b:ULongInt) Inline
    • Function Abs:Int(a:Int) Inline
    • Function Abs:Float(a:Float) Inline
    • Function Abs:Double(a:Double) Inline
    • Function Abs:Long(a:Long) Inline
    • Function Sgn:Int(a:Int) Inline
    • Function Sgn:Float(a:Float) Inline
    • Function Sgn:Double(a:Double) Inline
    • Function Sgn:Long(a:Long) Inline
    • Function RuntimeError( message:String )
    • Function IllegalArgumentError( message:String )
    • Function UnsupportedOperationError()
    • Function InvalidOperationError( message:String )
    • Function DebugStop()
    • Function DebugLog( message:String )
    • Function MemAlloc:Byte Ptr( size:Size_T, collectable:Int = False )
    • Function MemFree( mem:Byte Ptr, collectable:Int = False )
    • Function MemExtend:Byte Ptr( mem:Byte Ptr,size:Size_T,new_size:Size_T, collectable:Int = False )
    • Function OnEnd( fun() )
    • Function ReadStdin:String()
    • Function WriteStdout( str:String )
    • Function WriteStderr( str:String )
    • Function Delay( millis:Int )
    • Function UDelay( microseconds:Int )
    • Function MilliSecs:Int()
    • Function MemClear( mem:Byte Ptr,size:Size_T )
    • Function MemCopy( dst:Byte Ptr,src:Byte Ptr,size:Size_T )
    • Function MemMove( dst:Byte Ptr,src:Byte Ptr,size:Size_T )
    • Function GCSetMode( Mode:Int )
    • Function GCGetMode:Int()
    • Function GCSuspend()
    • Function GCResume()
    • Function GCCollect:Size_T()
    • Function GCCollectALittle:Int()
    • Function GCMemAlloced:Size_T()
    • Function GCEnter()
    • Function GCLeave()
    • Function GCRetain(obj:Object)
    • Function GCRelease(obj:Object)
    • Function GCThreadIsRegistered:Int()
    • Function GCRegisterMyThread:Int()
    • Function GCUnregisterMyThread:Int()
    • Function GCGetStats(stats:SGCStats Var)
    • Function HandleFromObject:Size_T( obj:Object )
    • Function HandleToObject:Object( handle:Size_T )
    • Function ArrayCopy(src:Object, srcPos:Int, dst:Object, dstPos:Int, length:Int)
    • Function IsEmptyArray:Int(obj:Object)
    • Function IsEmptyString:Int(obj:Object)
    • Function ObjectIsString:Int(obj:Object)
    • Function AtStart:Int(func(), priority:Int = 0)
  • Globals
    • Global AppDir:String="bbAppDir"
    • Global AppFile:String="bbAppFile"
    • Global AppTitle:String="bbAppTitle"
    • Global AppArgs:String[]="bbAppArgs"
    • Global LaunchDir:String="bbLaunchDir"
  • Consts
    • Const CHARSFORMAT_SCIENTIFIC:ULong = 1 Shl 0
    • Const CHARSFORMAT_FIXED:ULong = 1 Shl 2
    • Const CHARSFORMAT_HEX:ULong = 1 Shl 3
    • Const CHARSFORMAT_NOINFNAN:ULong = 1 Shl 4
    • Const CHARSFORMAT_JSON:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC | CHARSFORMAT_NOINFNAN
    • Const CHARSFORMAT_JSONORINFNAN:ULong = 1 Shl 5 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
    • Const CHARSFORMAT_FORTRAN:ULong = 1 Shl 6 | CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
    • Const CHARSFORMAT_GENERAL:ULong = CHARSFORMAT_FIXED | CHARSFORMAT_SCIENTIFIC
    • Const CHARSFORMAT_ALLOWLEADINGPLUS:ULong = 1 Shl 7
    • Const CHARSFORMAT_SKIPWHITESPACE:ULong = 1 Shl 8
  • Keywords
    • Abstract
    • And
    • Asc
    • Assert
    • Byte
    • Case
    • Catch
    • Chr
    • Const
    • Continue
    • Default
    • DefData
    • Delete
    • Double
    • Double128
    • EachIn
    • Else
    • ElseIf
    • End
    • EndEnum
    • EndExtern
    • EndFunction
    • EndIf
    • EndInterface
    • EndMethod
    • EndRem
    • EndSelect
    • EndStruct
    • EndTry
    • EndType
    • EndWhile
    • Enum
    • Exit
    • Export
    • Extends
    • Extern
    • False
    • Field
    • FieldOffset
    • Final
    • Finally
    • Float
    • Float128
    • Float64
    • For
    • Forever
    • Framework
    • Function
    • Global
    • If
    • Implements
    • Import
    • Incbin
    • IncbinLen
    • IncbinPtr
    • Include
    • Inline
    • Int
    • Int128
    • Interface
    • Len
    • Local
    • Long
    • LongInt
    • LParam
    • Method
    • Mod
    • Module
    • ModuleInfo
    • New
    • Next
    • Not
    • Null
    • Object
    • Or
    • Override
    • Pi
    • Private
    • Protected
    • Ptr
    • Public
    • ReadData
    • ReadOnly
    • Release
    • Rem
    • Repeat
    • RestoreData
    • Return
    • Sar
    • Select
    • Self
    • Shl
    • Short
    • Shr
    • Size_T
    • SizeOf
    • StackAlloc
    • StaticArray
    • Step
    • Strict
    • String
    • Struct
    • Super
    • SuperStrict
    • Then
    • ThreadedGlobal
    • Throw
    • To
    • True
    • Try
    • Type
    • UInt
    • ULong
    • ULongInt
    • Until
    • Using
    • Var
    • Varptr
    • Wend
    • Where
    • While
    • WParam
BlitzMax
Docs
Getting StartedDownloadsAbout
Community
Resources
More
GitHubStarChat on Discord
Copyright © 2026 Bruce A Henderson