-
Notifications
You must be signed in to change notification settings - Fork 3
BXF
Shivter edited this page Aug 12, 2024
·
5 revisions
This compiler can take functions defined with #function <name> and closed with #end, and copy them to anywhere where they're called with @<name>. This basically introduces functions without calling.
There is also an import feature. Examples:
-
#import test.bxfThis imports all commands and functions fromtest.bxf. The imported functions will have a prefix of the file name. In this example:test.<function> -
#import test.bxf as somethingThe imported functions will have a specified prefix. In this example:something.<function>The imported scripts/libraries can also import other scripts/libraries.
- You can't put functions into functions.
- The function can't invoke itself.
- The function can't invoke other functions of this kind. (They can still call normal functions)
- The compiled batch file might be larger than normal batch files if it's invoking a large function multiple times.
- Compilation time can reach over 10 seconds when dealing with over 1000 lines or many imported libraries on a 3GHz processor. The compiler is single-threaded.
- Invoking functions is instant. Comparable to the speed of Macros.
- If the function is invoked outside of parentheses, it can freely use
%enclosed variables. - Unlike Macros, they don't have a 8192 character limit.
- Everything is compiled into 1 batch file.

Shivtanium - Created by Shivter.