- Configuration
- Comments
// - Conditions
ifelseend - Constants
truefalseHIGHLOWINPUTOUTPUT - Cycles
forwhilenextbreakcontinue - Functions
functionlocalsreturndone - Macros
macro - Numeric variables
@@[] - Operators
+-*/%==!=>>=<<=&&||&|^>><<++--~not - Strings
::[] - System functions
adc readargscharcursordelayfile closefile openfile readfile writepipe closepipe openpipe readpipe writeincludeindexinputio openio readio writememmillisnumbernumericprintrandomrestartserial openserial readserial writesizestopstring - Unary operators
++--
BIPLAN supports only one numeric variable type that is by default long but can be easily changed with the use of constants:
// Sets the BIPLAN numeric type to int
#define BP_VAR_T int
#include "BIPLAN.h"Each variable is just an entry of a statically allocated array. The BP_VARIABLES constant can be used as shown below to configure the maximum amount of variables available:
#define BP_VARIABLES 50
#include "BIPLAN.h"BIPLAN supports up to 87 - BP_PARAMS user-defined variables, such as @my_var = 1 although it can get or set more variables using the access operator $[].
Each string is just an entry of a statically allocated array, the BP_STRINGS constant can be used as shown below to configure the maximum amount of strings available:
#define BP_STRINGS 50
#include "BIPLAN.h"BIPLAN supports up to 87 - BP_ARGS strings defined by the user, such as :my_string = "Hello world!" although it can get or set more strings using the access operator :[]. The maximum length of strings can be configured as follows:
// Sets BIPLAN string maximum length to 50
#define BP_STRING_MAX 50
#include "BIPLAN.h"Each function is just an entry of a global array of functions. The BP_FUNCTIONS constant can be used as shown below to configure the maximum amount of functions available:
#define BP_FUNCTIONS 50
#include "BIPLAN.h"The maximum amount of parameters available can be configured as follows:
#define BP_PARAMS 5
#include "BIPLAN.h"Consider that program parameters are stored in the variable address-space, so the maximum amount of user-defined variables is affected by the number of supported parameters.
The maximum function call depth can be configured as follows:
#define BP_FUN_DEPTH 5
#include "BIPLAN.h"BIPLAN supports a maximum amount of 87 functions defined by the user.
You can configure the maximum length of user-defined keywords using the BP_KEYWORD_MAX as follows:
#define BP_KEYWORD_MAX 20
#include "BIPLAN.h"The maximum length of user-defined macros can be configured defining BP_MACRO_MAX before including BIPLAN.h:
// The maximum length of a macro is 512 characters
#define BP_MACRO_MAX 512
#include "BIPLAN.h"The maximum amount of program arguments can be configured defining BP_ARGS before including BIPLAN.h:
// Accept up to 10 program arguments
#define BP_ARGS 10
#include "BIPLAN.h"Consider that program arguments are stored in the string address-space, so the maximum amount of user-defined strings is affected by the number of supported program arguments.
Each for variable is just an entry of a statically allocated array. The BP_FOR_VARIABLES constant can be used as shown below to configure the maximum amount of variables available:
#define BP_FOR_VARIABLES 50
#include "BIPLAN.h"The maximum value supported is 91.
The maximum amount of nested for and while can be configured defining BP_CYCLE_DEPTH before including BIPLAN.h:
// Accept up to 10 nested for/while
#define BP_CYCLE_DEPTH 10
#include "BIPLAN.h"Consider that one address in the variable address-space is used for each level of nesting, so the maximum amount of user-defined variables is affected by the nest level supported.