FBL Wiki
A smart script system for integrated into C/C++ project easily
Status: Alpha
Brought to you by:
awakesoft
FBL is a prefix-style language,that means every picece of codes start with a prefix.The other important thing is: only parentheses can chage the calculate order of a expression.eg: 1+2*3,the calculate order is first compute 1+2, then multiply with 3.If you want to compute 2*3 first,you should write like this:1+(2*3).
A standyard fbl script shoud looks like this:
//This is a commet.
//Use '//' to make a commet,same to C++.
//Import other fbl script,named it as eg2. Symbol '-' as a perfix means keyword.
-mount( "test/eg2.fbl","eg2");
//Import a lib.
-select( "fblstr" );
//Define a function.Symbol '&' as a perfix means function define.
&LocalPrint( "StrPar" )
{
//Call a function write in your C project.Symbol ':' as a perfix means call function in project.
//Note that symble '&' means address here,yes...fbl support fucking pointer.
:Printf( &StrPar );
}
&root( "IntPar" )
{
//Equal to C code: int Value[10]; memset( Value, 100, sizeof(int)*10 );
-var( "Value", 10, 100 );
//Calll a function write in this script.Symbol '@' means call a function in script.
@Printf( "Hello world" );
//Call a function from other fbl script,which we mounted as eg2.
@eg2:Printf( "Show other words" );
}