Specifications
6
1.2.2 What’s New in BHT-BASIC 3.5 Upgraded from
BHT-BASIC 3.0?
Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supports the following functions:
[ 1 ] Compiler
■ Object linkage editor, Linker
While BHT-BASIC 3.0 Compiler compiles a single source program into a single user program,
BHT-BASIC 3.5 Compiler can convert more than one source program into individual object
programs (intermediate code files for a user program) and then combine them together
through Linker to build a user program. With Linker, you may use existing object programs for
development of user programs.
■
Libraries
The Librarian allows you to build libraries out of object files resulting from compiling, which
makes it easier to use existing application programs. This facilitates the use of existing appli-
cation programs for development of other programs.
■
Projects
BHT-BASIC 3.5 has added a concept of Project that makes it easier to use multiple source pro-
grams for producing a user program.
[ 2 ] Statements
■ Added statements
Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supports several statements for making dis-
tinction between global variables and local variables, and for defining functions and constants.
Newly added statements
CALL Calls a SUB function in addition to an FN3 function.
CONST Defines symbolic constants to be replaced with labels.
DECLARE Declares user-defined function FUNCTION or SUB exter-
nally defined.
FUNCTION…END FUNCTION Names and defines user-defined function FUNCTION.
GLOBAL Declares one or more work variables or register variables
defined in a file, as global variables.
PRIVATE Declares one or more work variables or register variables
defined in a file, as local variables.
SUB...END SUB Names and defines user-defined function SUB.
BHT-BASIC 3.5 provides the constants definition file "BHTDEF.INC." Reading the "BHT-
DEF.INC" as an included file allows you to use constant names defined in that file.
Example
’$INCLUDE:’BHTDEF.INC’
OUT .pnLEDCtrl, .pvLEDGrn 'Turn LED (green) ON