Download Basic Compiler User's Manual V.2.0 - Kalisch Computer
Transcript
TABLE OF CONTENTS Preface................................................................................................................................iv 1 Development Environment ............................................................................................. 1 1.1 Disk Contents ......................................................................................................... 1 1.2 System Requirements ............................................................................................. 2 1.3 Development Flow .................................................................................................. 3 1.3.1 Download Run-time Engine............................................................................... 3 1.3.2 Edit and Compile the BASIC Program................................................................ 4 1.3.3 Download the BASIC Object Files ..................................................................... 4 1.4 BASIC Run-time Engine .......................................................................................... 5 2 Using CipherLab BASIC Compiler .................................................................................. 8 2.1 File Menu ............................................................................................................... 8 2.2 Edit Menu ............................................................................................................... 8 2.3 Config Menu........................................................................................................... 9 2.4 Compile Menu ...................................................................................................... 10 2.5 Help Menu ............................................................................................................ 11 3 Basics of CipherLab BASIC Language .......................................................................... 12 3.1 Constants............................................................................................................. 12 3.1.1 String ............................................................................................................ 12 3.1.2 Numeric......................................................................................................... 12 3.2 Variables .............................................................................................................. 13 3.2.1 Variable Names and Declaration Characters .................................................... 13 3.2.2 Array Variables .............................................................................................. 13 3.3 Expression and Operators ..................................................................................... 14 3.3.1 Assignment Operator...................................................................................... 14 3.3.2 Arithmetic Operator ........................................................................................ 14 3.3.3 Relational Operator ........................................................................................ 14 3.3.4 Logical Operator ............................................................................................ 15 3.4 Operator Precedence............................................................................................ 16 3.5 Labels .................................................................................................................. 17 3.6 Subroutines .......................................................................................................... 18 3.7 Programming Style................................................................................................ 19 4 BASIC Commands ...................................................................................................... 20 4.1 General Commands .............................................................................................. 21 4.2 Commands for Decision Structures ........................................................................ 24 4.3 Commands for Looping Structures ......................................................................... 27 4.4 Commands for String Processing ........................................................................... 29 4.4.1 Combining Strings .......................................................................................... 29 4.4.2 Comparing Strings.......................................................................................... 29 4.4.3 Getting the Length of a String.......................................................................... 29 4.4.4 Searching for Strings ...................................................................................... 30 4.4.5 Retrieving Part of Strings ................................................................................ 30 4.4.6 Converting for Strings ..................................................................................... 32 4.4.7 Creating Strings of Repeating Characters ........................................................ 34 4.5 Commands for Event Trapping .............................................................................. 35 4.5.1 Event Triggers ............................................................................................... 35 4.5.2 Lock and Unlock ............................................................................................ 44 4.6 System Commands ............................................................................................... 45 4.7 Reader Commands ............................................................................................... 47 4.8 Keyboard Wedge Commands ................................................................................ 53 4.8.1 Definition of the WedgeSetting array................................................................ 53 4.8.2 KBD / Terminal Type ...................................................................................... 53 4.8.3 Capital Lock Auto-Detection ............................................................................ 54 4.8.4 Capital Lock Status Setting ............................................................................. 54 4.8.5 Alphabets Case.............................................................................................. 54 ii