I have just released the Unofficial BlitzBasic Preprocessor as open source under the GPL lisence. You can download the full source code and EXE here. If you make any improvements to the source, I ask that you send them to huntersd@... for possible inclusion in newer releases.
I am releasing this as free and open source because...
1) It is important to have things a standard, and if some people had the preprocessor and others did not code sharing would become a problem
2) I can't develop it forever and the open source model is the best for fast and efficient bug swatting
The Unofficial BlitzBasic Preprocessor is still in heavy development.
[EDIT - Here is some more information]
The Unofficial BlitzBasic Preprocessor is a preprocessor for (amazingly enough!) BlitzBasic, Blitz3D and BlitzPlus. Its purpose is to preprocessor source files to add features easily that would otherwise be hard for the user to implement in pure Blitz code.
Currently, it features:
Option Explicit - Completion 100%
Enabled with a simple #Option Explicit, the preprocessor will warn of implicit variable declarations in the source code it is passed.
Macros - Completion 100%
Macros can be defined with the following syntax:
...would generate...
Inline Functions - Completion 50% [General inline code completed but you cannot yet inline calls automatically]
Currently, you can call an inline function with the following syntax:
...would be the same as...
Defining/IfDefs - Completion 100%
An example of the commands in use:
Not implemented is the C style attaching things to them.
Including code from a central directory - Completion 100%
Will include "source.bb" from the central source directory rather than relative to the main source files path.
Type Writing Commands - Completion 100%
The following directives are implemented:
These commands do NOT recurse through all non null pointers in the type and store the 'children' too, they simply deal with ints, strings and floats.
I am releasing this as free and open source because...
1) It is important to have things a standard, and if some people had the preprocessor and others did not code sharing would become a problem
2) I can't develop it forever and the open source model is the best for fast and efficient bug swatting
The Unofficial BlitzBasic Preprocessor is still in heavy development.
[EDIT - Here is some more information]
The Unofficial BlitzBasic Preprocessor is a preprocessor for (amazingly enough!) BlitzBasic, Blitz3D and BlitzPlus. Its purpose is to preprocessor source files to add features easily that would otherwise be hard for the user to implement in pure Blitz code.
Currently, it features:
Option Explicit - Completion 100%
Enabled with a simple #Option Explicit, the preprocessor will warn of implicit variable declarations in the source code it is passed.
Macros - Completion 100%
Macros can be defined with the following syntax:
#defmacro SomeMacro Arg1 = Arg2 + Arg3 CallSomeFunction( Arg1, Arg2, Arg4 ) #enddefmacro #macro SomeMacro, a, b, c, d
...would generate...
a = b + c CallSomeFunction( a, b, d )
Inline Functions - Completion 50% [General inline code completed but you cannot yet inline calls automatically]
Currently, you can call an inline function with the following syntax:
#inline FunctionName, Arg1, Arg2, Arg3, ... #setinlineresult FunctionResult
...would be the same as...
FunctionResult = FunctionName( Arg1, Arg2, Arg3 )
Defining/IfDefs - Completion 100%
An example of the commands in use:
#ifndef ThisSourceIncluded #define ThisSourceIncluded Print "Source File Not Already Included" #ifelse Print "Source File Already Included" #ifend
Not implemented is the C style attaching things to them.
Including code from a central directory - Completion 100%
#Include "source.bb"
Will include "source.bb" from the central source directory rather than relative to the main source files path.
Type Writing Commands - Completion 100%
The following directives are implemented:
#WriteType Type_Name, Pointer.Type_Name, Stream_Handle #ReadType Type_Name, Pointer.Type_Name, Stream_Handle #PokeType Type_Name, Pointer.Type_Name, Bank_Handle, Offset #PeekType Type_Name, Pointer.Type_Name, Bank_Handle, Offset #SizeOf Type_Name, Pointer.Type_Name, VariableToStore
These commands do NOT recurse through all non null pointers in the type and store the 'children' too, they simply deal with ints, strings and floats.
