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
Summary of Contents for BHT-BASIC 100 SERIES
Page 1: ......
Page 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Page 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Page 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Page 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...