Denso Power Net Terminal BHT-103 Dokumentacja

Przeglądaj online lub pobierz Dokumentacja dla Czytniki kodów kreskowych Denso Power Net Terminal BHT-103. Denso Power Net Terminal BHT-103 Specifications Instrukcja obsługi

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 577
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 0
Przeglądanie stron 0
1 2 3 4 5 6 ... 576 577

Podsumowanie treści

Strona 2

21.1 Software Overview1.1.1 Software Structure of the BHTThe structure of software for the BHT is shown below.The BHT has a flash ROM and RAM. All of

Strona 3

92Two-byte Kanji Mode• Standard-size fontBe careful about the specification of line numbers in figures below. A single columnshown below represents a

Strona 4 - How this book is organized

Chapter 7. I/O Facilities93• Small-size fontBe careful about the specification of line numbers in figures below. A single columnshown below represent

Strona 5

947.1.3 Dot Patterns of Fonts Character fontsIn the figures below, " " shows a display area for characters. Any character is displayedwith

Strona 6

Chapter 7. I/O Facilities95Two-byte Kanji Mode• Standard-size fontHalf-width Kanji8 x 16 dots (Regular)Half-width Kanji16 x 16 dots (Double-width)Half

Strona 7

96• Small-size fontHalf-width Kanji6 x 12 dots (Regular) Half-width Kanji12 x 12 dots (Double-width)Half-width Kanji6 x 24 dots (Double-height)Half-wi

Strona 8 - Screen Indication

Chapter 7. I/O Facilities97 Cursor shapeThe LOCATE statement specifies the cursor shape--Underline cursor, full block cursor, orinvisible.You may de

Strona 9 - Software Overview for the BHT

98Two-byte Kanji Mode• Standard-size font ( 8 x 16 dots)Full block cursorInvisibleFull block cursorInvisibleFull block cursorInvisibleFull block curso

Strona 10 - 1.1 Software Overview

Chapter 7. I/O Facilities99• Small-size font (6 x 12 dots)Full block cursorInvisibleFull block cursorInvisibleFull block cursorInvisibleFull block cur

Strona 11

1007.1.4 Mixed Display of Different Screen Modes, FontSizes, and/or Character Enlargement Sizes[ 1 ] ANK Mode and Kanji Mode Together in One LineANK c

Strona 12 - 1.1.2 Overview of BHT-BASIC

Chapter 7. I/O Facilities101[ 3 ] Regular-Size and Double-Width Characters Together onthe Same ScreenThe regular-size and double-width characters may

Strona 13 - 1.2 BHT-BASIC

Chapter 1. Software Overview for the BHT3 System ProgramsDriversA set of programs which is called by the BHT-BASIC Interpreter or System Mode anddire

Strona 14 - BHT-BASIC 3.0?

102[ 5 ] Regular-Size and Quadruple-Size Characters Together onthe Same ScreenThe regular-size and quadruple-size characters may display together on t

Strona 15 - PRIVATE or GLOBAL statement)

Chapter 7. I/O Facilities103 Switching the character size from the regular-size to double-height or qua-druple-sizeWith the same screen font being in

Strona 16 - 1.3.2 Interpreter

1047.1.5 Displaying User-defined Characters Loading a user-defined fontThe APLOAD or KPLOAD statement loads a user-defined font.The APLOAD statement

Strona 17 - Chapter 2

Chapter 7. I/O Facilities1057.1.6 VRAMThe INP function may read the VRAM data. The OUT statement writes data into the VRAM sothat graphics may be dis

Strona 18

106 Setting an 8-bit binary patternThe data of an 8-bit binary pattern should be designated by bit 7 (LSB) to bit 0 (MSB) in theOUT statement or INP f

Strona 19 - 2.1.1 Required Hardware

Chapter 7. I/O Facilities1077.1.7 Other Facilities for the LCD Setting national charactersUsing the COUNTRY$ function displays currency symbols and s

Strona 20 - 2.1.2 Required Software

1087.2 Input from the Keyboard7.2.1 Alphabet EntryIn addition to the numeric entry from the keypad, the BHT-100 supports software keyboardentry. Swit

Strona 21 - 2.2.1 Developing Procedures

Chapter 7. I/O Facilities109 Alphabet Entry Procedure(1) Switch to the alphanumeric entry system as follows:Issue "OUT &h60B0,1".(2) Sw

Strona 22

110When no key is ready to be established, pressing any of the function keys, BS, C,ENT, and magic keys will return the key data of the pressed key.(E

Strona 23 - 2.3 Writing a Source Program

Chapter 7. I/O Facilities1117.3 Timer and Beeper7.3.1 Timer FunctionsThe timer functions (TIMEA, TIMEB, and TIMEC) are available in BHT-BASIC for accu

Strona 24

41.1.2 Overview of BHT-BASICWith BHT-BASIC, you can customize application programs for meeting your specific needs asgiven below.• Retrieving products

Strona 25 - 2.4 Producing a User Program

1127.4 Controlling and Monitoring the I/Os7.4.1 Controlling by the OUT StatementThe OUT statement can control the input and output devices (I/Os) list

Strona 26 - Procedure

Chapter 7. I/O Facilities1137.4.3 Monitoring by the WAIT StatementThe WAIT statement monitors the input and output devices (I/Os) listed in Appendix D

Strona 27 - [ 1 ] Select a source file

1147.5 Entry from the Touch Screen(Only for models equipped with a touch screen)7.5.1 OutlineThe touch screen supports the following functions:(1) Fun

Strona 28 - [ 1 ] Create a new project

Chapter 7. I/O Facilities1157.5.2 Function Touch KeysEight function touch keys are defined by the System. You may enable four or eight of thosesystem-

Strona 29

116[ 3 ] Assigning data to a function touch keyYou may assign a desired character string (up to two characters) or a single control code to afunction

Strona 30

Chapter 7. I/O Facilities117[ 4 ] Displaying a character string on a function touch keyYou may display a desired character string on a function touch

Strona 31

118The sample below may display only "ABC" on a function touch key.KEYNO% = 3DSPDATA$ = "ABCDE"FONT% = .cnANK ’Standard-size font

Strona 32

Chapter 7. I/O Facilities1197.5.3 User-Defined Touch KeysYou may define touch keys in arbitrary areas on the touch screen.You may operate those touch

Strona 33 - 2.4.4 Compiling and Building

120 - If the specified character string length exceeds the specified touch key area, the excess willbe discarded. In the sample below, only "ABC&

Strona 34 - [ 3 ] Building

Chapter 7. I/O Facilities1217.5.4 Software Keyboard[ 1 ] Enabling/disabling software keyboardEnable the software keyboard function by using the OUT s

Strona 35

Chapter 1. Software Overview for the BHT51.2 BHT-BASIC1.2.1 FeaturesBHT-BASIC is designed as an optimal programming language in making application pro

Strona 36 - Main Window

122Taking a shortcut through the above flowIf you issue the OUT statement (e.g., OUT 5,3), the software keyboard will automaticallyappear the moment

Strona 37

Chapter 7. I/O Facilities123[ 2 ] Displaying the software keyboardThe software keyboard may display on the upper or lower area on the screen. If funct

Strona 38 - 2.4.7 Options

1247.5.5 Getting the Touch Screen StatusThe system may get the current touch screen status of whether the touch screen is pressed ornot and the coordi

Strona 39 - • Label–address file (.LBL)

125Chapter 8 FilesCONTENTS8.1 File Overview... 1258.1.1 Da

Strona 40 - Address-source list

1268.1 File Overview8.1.1 Data Files and Device I/O FilesBHT-BASIC treats not only data files but also bar code device I/Os and communications deviceI

Strona 41 - Symbol table

Chapter 8. Files1278.2 Data Files8.2.1 OverviewLike user programs, data files will be stored in the user area of the memory. The location of theuser

Strona 42 - Cross reference

1288.2.3 Structure of Data Files RecordA data file is made up of a maximum of 32767 records. A record is a set of data in a datafile and its format

Strona 43 - [ 5 ] Outputting a mapfile

Chapter 8. Files1298.2.4 Data File Management by Directory Informa-tionThe Interpreter manages data files using the directory information stored in th

Strona 44 - • Details of object codes

1308.2.5 Programming for Data Files Input/Output for Numeric Data- To write numeric data into a data file:It is necessary to use the STR$ function fo

Strona 45 - Command Line

Chapter 8. Files131 Restrictions on Input/Output of Data FilesNo INPUT#, LINE INPUT#, or PRINT# statement or INPUT$ function can access datafiles. T

Strona 46 - [ 2 ] Options

61.2.2 What’s New in BHT-BASIC 3.5 Upgraded fromBHT-BASIC 3.0?Based on BHT-BASIC 3.0, BHT-BASIC 3.5 newly supports the following functions:[ 1 ] Compi

Strona 47

1328.2.6 About DrivesThe BHT-100 has logical drives.Drive B is provided for ensuring compatibility with other BHT series.If you specify drive name &qu

Strona 48

Chapter 8. Files1338.3 Bar Code Device8.3.1 Overview Opening the Bar Code Device by OPEN "BAR:" StatementBHT-100QThe OPEN "BAR:"

Strona 49

134BHT-100BThe OPEN "BAR:" statement opens the bar code device. In this statement, you may spec-ify the following bar code types available

Strona 50

Chapter 8. Files135 Specifying Options in the OPEN "BAR:" StatementBHT-100QYou may also specify several options as listed below for each of

Strona 51

136You can check whether the barcode buffer stores code data, by using any of the EOF, INP,and LOC functions, and the WAIT statement. Any of the INPUT

Strona 52 - 2.5 Downloading

Chapter 8. Files1378.3.2 Programming for Bar Code Device Code MarkThe MARK$ function allows you to check the code mark (denoting the code type) and t

Strona 53 - 2.6 Executing a User Program

138 Read Mode of the Trigger SwitchThe trigger switch function is assigned to the magic keys M3 and M4 by default. You mayassign the trigger switch fu

Strona 54 - Chapter 3

Chapter 8. Files139This way, you can control the indicator LED, enabling that:• a user program can check the value of a scanned bar code and turn on t

Strona 55 - 3.1 Program Overview

140 Reading Split QR Codes (for the BHT-100Q)The "QR Code" system supports a split QR code feature ("Structured Append") which can

Strona 56 - [ 3 ] User-defined Functions

Chapter 8. Files1418.4 Communications Device8.4.1 Hardware Required for Data CommunicationsThe following hardware is required for communications betwe

Strona 57

Chapter 1. Software Overview for the BHT7 Defining and declaring user-defined functions more easilyBHT-BASIC 3.5 has added FUNCTION…END FUNCTION, SUB

Strona 58 - 3.2 Handling User Programs

1428.4.3 Overview of Communications ProtocolsThe BHT supports two communications protocols—BHT-protocol and BHT-Ir protocol for filetransmission. Usi

Strona 59 - 3.2.3 Included Files

Chapter 8. Files143[ 2 ] BHT-Ir protocolIn addition to the BHT-protocol, the BHT supports the BHT-Ir protocol.If you select the BHT-Ir protocol by usi

Strona 60 - Chapter 4

1448.4.4 File Transfer Tools[ 1 ] Transfer UtilityTransfer Utility is optionally available in two versions: MS-DOS–based and Windows-based. Itsupport

Strona 61 - [ 1 ] Labels

145Chapter 9 Event Polling and Error/Event TrappingCONTENTS9.1 Overview...

Strona 62 - [ 3 ] Comments

1469.1 OverviewBHT-BASIC supports event polling and two types of trapping: error trapping and event trap-ping. Event PollingMakes programs monitor t

Strona 63 - 4.1.2 Program Line Length

Chapter 9. Event Polling and Error/Event Trapping1479.2 Event Polling[ 1 ] Programming sampleThe program below shows the event polling example which m

Strona 64 - 4.2 Usable Characters

148[ 2 ] I/O devices capable of being monitored by the event poll-ingListed below are the I/O devices which the event polling can monitor.* Only for m

Strona 65 - DATE$ function

Chapter 9. Event Polling and Error/Event Trapping1499.3 Error Trapping[ 1 ] OverviewIf a run-time error occurs during program running, error trapping

Strona 66

150[ 2 ] Programming for trapping errorsTo trap errors, use the ON ERROR GOTO statement in which you should designate the error-handling routine (to w

Strona 67 - 4.3 Labels

Chapter 9. Event Polling and Error/Event Trapping1519.4 Event (of Keystroke) Trapping[ 1 ] OverviewIf any of the function keys previously specified fo

Strona 68 - 4.4 Identifiers

81.3 Program Development and Execu-tionBHT-BASIC consists of Compiler and Interpreter.1.3.1 CompilerBHT-BASIC 3.5 Compiler consists of the following C

Strona 69 - 4.5 Reserved Words

152If function keys specified for keystroke trapping are pressed during execution of the followingstatements or functions relating keyboard input, thi

Strona 70 - Chapter 5

153Chapter 10 Sleep FunctionCONTENTS10.1 Sleep Function...

Strona 71 - 5.1 Constants

15410.1 Sleep FunctionThe BHT supports the sleep function that automatically interrupts program execution if noevent takes place within the specified

Strona 72 - Real Constants

155Chapter 11 Resume FunctionCONTENTS11.1 Resume Function... 15

Strona 73 - [ 1 ] String Variables

15611.1 Resume FunctionThe resume function automatically preserves the current status of a running application pro-gram (user program) when the BHT is

Strona 74 - [ 2 ] Numeric Variables

157Chapter 12 Power-related FunctionsCONTENTS12.1 Low Battery Warning ...

Strona 75 - Register Variables

15812.1 Low Battery WarningIf the output voltage of the battery cartridge drops below a specified lower level limit when theBHT is in operation, then

Strona 76 - 5.3 User-defined Functions

Chapter 12. Power-related Functions15912.3 Wakeup FunctionThe wakeup function allows you to turn the BHT on at the wakeup time (of the system clock)sp

Strona 77 - 5.4 Type Conversion

16012.4 Remote Wakeup Function [ 1 ] OutlineThe remote wakeup function allows you to turn the BHT on and run the specified user program(hereafter refe

Strona 78 - AND, OR, NOT, and XOR

Chapter 12. Power-related Functions161At the BHT(1) Turn the BHT off and put it on the CU.The BHT will enter into the charge state* (i.e., into sleep)

Strona 79 - 5.5 Scope of Variables

9Chapter 2 Development Environment and ProceduresCONTENTS2.1 Overview of Development Environment ...

Strona 80

162[ 3 ] Remote wakeup program File nameThe BHT may handle the file named "BHTRMT.PD3" as a remote wakeup program.Upon receipt of data cont

Strona 81 - 5.5.2 Local Variables

Chapter 12. Power-related Functions163Once made in a user program, the above settings will be retained even after the termination ofthe user program.T

Strona 82

164 Checking the execution record of remote wakeupWhen starting, a user program (including a remote wakeup program) may check via the I/Oports whether

Strona 83 - 5.5.4 Common Variables

165Chapter 13 Backlight FunctionCONTENTS13.1 Backlight Function ...

Strona 84 - Chapter 6

16613.1 Backlight FunctionThe BHT has a backlight function (LCD backlight and key backlight). Pressing the right-handtrigger switch (M4 key) while ho

Strona 85 - 6.1 Overview

Chapter 13. Backlight Function167Setting 0 to port 6020h deactivates the backlight function and turns off the backlight if lit.When the backlight func

Strona 86 - 6.2 Operator Precedence

168Chapter 14Statement ReferenceCONTENTSAPLOAD ...169BEEP ...

Strona 87 - 4.5-1 (=3.5)

169*ANK: Alphanumeric and KatakanaSyntax:Syntax 1 (Loading a user-defined font):APLOAD characode,fontarraynameSyntax 2 (Loading a user-defined cursor

Strona 88 - 6.3 Operators

Chapter 14. Statement Reference170• If you issue more than one APLOAD statement specifying a same character code,the last statement takes effect.• Onl

Strona 89 - 6.3.2 Relational Operators

171• The cursor size will be as shown below.• An array integer variable--a work array, register array, or common array--for cur-sorarrayname should be

Strona 90 - NOT operator

102.4.7 Options... 30[ 1 ] Compiling options...

Strona 91 - XOR operator

Chapter 14. Statement Reference172Syntax errors:Run-time errors:Example:DIM cp%(11)cp%(0)=&h0C00cp%(1)=&h0F00cp%(2)=&h0FC0cp%(3)=&h0FF

Strona 92 - 6.3.5 String Operators

173Reference:Statements:COMMON, DEFREG, DIM, KPLOAD, PRINT, and SCREENcp%(10)cp%(11)cp%(0) cp%(1) cp%(2) cp%(3) cp%(4) cp%(5) cp%(6) cp%(7) cp%(8) cp%

Strona 93 - PRINT a1$<b1$

Chapter 14. Statement Reference174Syntax:BEEP[onduration[,offduration[,repetitioncount[,frequency]]]]Parameter:onduration, offduration, and repetition

Strona 94 - Chapter 7

175You may change the beeper volume with the OUT statement. (For details, refer toAppendix D, "I/O Ports.")If you set a value other than 0,

Strona 95

Chapter 14. Statement Reference176Syntax errors:Run-time errors:Example:BEEP bon%,boff%,count%,helz%BEEP bon%,boff%,count%BEEP bon%,boff%,,helz%BEEP b

Strona 96 - 7.1 Output to the LCD Screen

177Syntax:Syntax 1 (Calling an FN3):CALL "[drivename:]filename" functionnumber [data [,data]...]Syntax 2 (Calling a SUB):CALL functionname [

Strona 97 - Display angle

Chapter 14. Statement Reference178•filename is the name of an FN3 function. The extension of the file names isfixed to .FN3. (For the FN3 functions,

Strona 98 - Tone attribute

179 Calling a user-defined function (SUB function)This statement calls a user-defined function specified by functionname. Youmay omit CALL when call

Strona 99 - 7.1.2 Coordinates on the LCD

Chapter 14. Statement Reference180Run-time errors:Reference:Statements: DECLARE and SUB...END SUBError code Meaning02hSyntax error("[drivename:]f

Strona 100

181Syntax:CHAIN "[drivename:]programfilename"Parameter:"[drivename:]programfilename"A string expression.Description:CHAIN transfer

Strona 101

Chapter 2. Development Environment and Procedures112.1 Overview of Development Environ-mentThe following hardware and software are required for develo

Strona 102 - 24 x 24 dots (Quadruple)

Chapter 14. Statement Reference182Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 3: ’"’ missingNo double quote prece

Strona 103 - • Standard-size font

183Syntax:CLFILE [#]filenumberParameter:filenumberA numeric expression which returns a value from 1 to 16.Description:CLFILE erases data in the data f

Strona 104 - • Small-size font

Chapter 14. Statement Reference184Example:OPEN "master.Dat" AS #1FIELD #1,20 AS bar$,10 AS ky$CLFILE #1CLOSE #1

Strona 105 - Cursor shape

185Syntax:CLOSE [[#]filenumber[,[#]filenumber...]]Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:CLOSE closes

Strona 106

Chapter 14. Statement Reference186Syntax:CLSDescription:CLS clears the liquid crystal display (LCD) screen and returns the cursor to theupper left cor

Strona 107 - In quadruple size

187Syntax:COMMON commonvariable[,commonvariable...]Parameter:commonvariableA non-array integer variable, a non-array real variable, a non-array string

Strona 108

Chapter 14. Statement Reference188Syntax errors:Run-time errors:Example:COMMON a%,b,c$,d%(2,3),e(4),f$(5)Reference:Error code and message Meaningerror

Strona 109

189Syntax:CONST constname = exprParameter:constnameA label, identifier, or string expression of a maximum of 10 characters con-sisting of alphanumeric

Strona 110 - Small-size font coordinates

Chapter 14. Statement Reference190Syntax:CURSOR {ON|OFF}Description:When a user program is initiated, the cursor is set to OFF. CURSOR ON turns on th

Strona 111 - Coordinates

191Syntax:DATA literal[,literal...]Parameter:literalA numeric or string constant.Description:DATA stores numeric and string literals so that READ stat

Strona 112 - Loading a user-defined font

Copyright © DENSO WAVE INCORPORATED, 2001All rights reserved. No part of this publication may be reproduced in any form or by any meanswithout permis

Strona 113 - 7.1.6 VRAM

122.1.2 Required Software• OS Windows95/98 or WindowsNT4.0/Windows2000• Editor• BHT-BASIC 3.5 Compiler BHTC35W.EXE (Integrated environment manager)BHT

Strona 114 - ’Set bit 7 only to 1

Chapter 14. Statement Reference192Syntax:Syntax 1 (Defining a numeric FUNCTION):DECLARE FUNCTION funcname [(dummyparameter[,dummyparameter...])]Syntax

Strona 115 - Specifying the cursor shape

193Description:DECLARE defines a user-defined function defined in other source program files.• Declaration of a user-defined function should appear pr

Strona 116 - 7.2 Input from the Keyboard

Chapter 14. Statement Reference194Syntax:Syntax 1 (Defining a numeric function):DEF FNfunctionname[(dummyparameter[,dummyparameter ...])]=expressionSy

Strona 117 - Alphabet Entry Procedure

195Description: Creating a user-defined functionDEF FN creates a user-defined function.• Definition of a user-defined function should appear precedin

Strona 118 - [ 2 ] Shift key

Chapter 14. Statement Reference196Syntax errors: When defining a user-defined function When calling a user-defined functionError code and message Me

Strona 119 - 7.3 Timer and Beeper

197Run-time errors:Example: Example 1DEF FNadd(a%,b%)=a%+b%PRINT FNadd(3,5) Example 2DEF FNappend$(a$,b$)[80]=a$+b$PRINT FNappend$("123",&

Strona 120 - INP Function

Chapter 14. Statement Reference198Syntax:Syntax 1 (Defining a numeric function):DEF FNfunctionname[(dummyparameter[,dummyparameter ...])]Syntax 2 (Def

Strona 121 - WAIT Statement

199Description: Creating a user-defined functionDEF FN...END DEF creates a user-defined function. The function definition blockbetween DEF FN and EN

Strona 122 - 7.5.1 Outline

Chapter 14. Statement Reference200 Calling a user-defined functionFNfunctionname calls a user-defined function.• The number of realparameters should

Strona 123 - Non-shift mode Shift mode

201 When calling a user-defined functionRun-time errors:Example:DEF FNappend$(a$,b%)[128] C$="" FOR i%=1 TO b% C$=C$+a$ NEXT F

Strona 124

Chapter 2. Development Environment and Procedures132.2 Overview of Developing Proce-dures2.2.1 Developing ProceduresThe program developing procedures

Strona 125 - F13 F14 F15 F16

Chapter 14. Statement Reference202Syntax:DEFREG registerdefinition[,registerdefinition ...]Parameter:registerdefinitionnon-arraynumericvariable [=nume

Strona 126 - [ 5 ] Keystroke trapping

203numericinitialvaluedefinitionFor one-dimensional:{numericconstant[,numericconstant...]}DEFREG n6%(3)={9,8,7,6}For two-dimensional:{{numericconstant

Strona 127 - 7.5.3 User-Defined Touch Keys

Chapter 14. Statement Reference204Syntax errors:Error code and message Meaningerror 6: Variable name redefinitionA same register variable name is dou-

Strona 128 - FN3"

205Example:Example 1: Valid DEFREG statementsDEFREG a,e$DEFREG b=100,c(10),d$(2,4)[10]DEFREG bps$="19200"DEFREG a%(2)={1,2}DEFREG a%(2)={1,

Strona 129 - 7.5.4 Software Keyboard

Chapter 14. Statement Reference206Syntax:DIM arraydeclaration[,arraydeclaration...]Parameter:arraydeclarationnumericvariable (subscript)DIM n1%(12)DIM

Strona 130 - OUT 5,3)

207• In declaring an array string variable, you can specify the string length. If its speci-fication is omitted, the default value of 20 characters t

Strona 131

Chapter 14. Statement Reference208Syntax:ENDDescription:END terminates program execution and sounds the beeper for a second.• An END can appear anywhe

Strona 132

209Syntax:ERASE arrayvariablename[,arrayvariablename...]Parameter:arrayvariablenameAn array numeric or array string variable.Description:ERASE erases

Strona 133 - Chapter 8

Chapter 14. Statement Reference210Syntax:FIELD [#]filenumber,fieldwidth AS fieldvariable[,fieldwidth AS fieldvariable...]Parameter:filenumberA numeric

Strona 134 - 8.1 File Overview

211Syntax errors:Run-time errors:Example:fileNumber% = 4OPEN "Datafile.dat" AS #fileNumber%FIELD #fileNumber%,20 AS code39$,16 AS itf$,5 AS

Strona 135 - 8.2 Data Files

142.2.2 Functions of BHT-BASIC 3.5BHT-BASIC 3.5 contains Compiler, Linker, and Librarian whose functions are listed below.Functions of Compiler Descri

Strona 136 - 8.2.3 Structure of Data Files

Chapter 14. Statement Reference212Syntax:FOR controlvariable = initialvalue TO finalvalue [STEP increment]...NEXT [controlvariable]Parameter:controlva

Strona 137 - • Number of Written Records

213• The default value of increment is 1.• You can nest FOR...NEXT statements to a maximum of 10 levels.• When using the FOR...NEXT statement together

Strona 138 - Deletion of Data Files

Chapter 14. Statement Reference214Syntax:Syntax 1 (Defining a numeric function):FUNCTION funcname [(dummyparameter [,dummyparameter...])]Syntax 2 (Def

Strona 139 - Drive Defragmentation

215Description: Creating a user-defined functionFUNCTION...END FUNCTION creates a user-defined function. The function defini-tion block between FUNC

Strona 140 - 8.2.6 About Drives

Chapter 14. Statement Reference216• If you specify a global variable in realparameter when calling a user-definedfunction, the user-defined function c

Strona 141 - 8.3 Bar Code Device

217 When calling a user-defined functionRun-time errors:Error code and message Meaningerror 96: Incomplete control struc-ture (FUNC-TION...END FUNCTI

Strona 142 - BHT-100B

Chapter 14. Statement Reference218Example:File 1 File 2DECLARE FUNCTION add(x,y) FUNCTION add(X,Y)A=1:B=2 add=X+YPRINT "TEST" END FUNCTION

Strona 143

219Syntax:GET [#]filenumber[,recordnumber]Parameter:filenumberA numeric expression which returns a value from 1 to 16.recordnumberA numeric expression

Strona 144 - EOF, INP

Chapter 14. Statement Reference220Syntax errors:Run-time errors:Example:GET #filNo,RecordNoGET #4GET #3,100Reference:Error code and message Meaningerr

Strona 145 - Multiple Code Reading

221Syntax:GLOBAL varname [,varname...]Parameter:varnamenumericvar [(subscript)]stringvar [(subscript)[[stringlength]]]subscriptFor one-dimensional: in

Strona 146 - Reading

Chapter 2. Development Environment and Procedures152.3 Writing a Source Program2.3.1 Writing a Source Program by an EditorTo write a source program, u

Strona 147

Chapter 14. Statement Reference222Syntax errors:Run-time errors:Reference:Statements: DIM and PRIVATEError code and message Meaningerror 7: Variable n

Strona 148

223Syntax:GOSUB labelDescription:GOSUB calls a subroutine specified by label.• Within the subroutine itself, you use a RETURN statement which indicate

Strona 149 - 8.4 Communications Device

Chapter 14. Statement Reference224Run-time errors:Reference:Error code Meaning03h RETURN without GOSUB07hInsufficient memory space(Too deep nesting)St

Strona 150 - [ 1 ] BHT-protocol

225Syntax:GOTO labelDescription:GOTO unconditionally transfers control to a label specified by label.• In an IF statement block, you can omit GOTO imm

Strona 151 - [ 2 ] BHT-Ir protocol

Chapter 14. Statement Reference226Syntax:Syntax 1:IF conditionalexpression THENstatementblock1[ELSEstatementblock2]END IFSyntax 2:IF conditionalexpres

Strona 152 - 8.4.4 File Transfer Tools

227• A block-structured IF statement block has the following advantages over a sin-gle-line IF statement (which is not supported in BHT-BASIC):- More

Strona 153 - Chapter 9

Chapter 14. Statement Reference228Syntax:INPUT [;]["prompt"{,|;}]variableParameter:"prompt"A string constant.variableA numeric or

Strona 154 - 9.1 Overview

229• The cursor shape specified by the most recently executed LOCATE statementtakes effect.• Even after execution of the CURSOR OFF statement, the INP

Strona 155 - 9.2 Event Polling

Chapter 14. Statement Reference230Run-time errors:Reference:Error code Meaning06hThe operation result is out of the allowable range.(Numeric variable

Strona 156

231Syntax:INPUT #filenumber,variable[,variable...]Parameter:filenumberA numeric expression which returns a value from 1 to 16.variableA numeric or str

Strona 157 - 9.3 Error Trapping

16• Comment lines starting with a single quotation mark (') and those with a REM should havethe following description rules each.A single quotati

Strona 158

Chapter 14. Statement Reference232• Notes for entering numeric data:Valid characters include 0 to 9, a minus sign (-), and a period (.). They should

Strona 159 - [ 1 ] Overview

233(*Only for models equipped with a touch screen)Syntax:Syntax 1 (Assigning a string or a control code to a function key):KEY keynumber,stringdataSy

Strona 160

Chapter 14. Statement Reference234Description: Assigning a string or a control code to a function keyKEY in syntax 1 assigns a string or a control co

Strona 161 - Chapter 10

235• Pressing the M4 key (key number 38) while holding down the shift key functionsas a backlight on/off control key by default.• If pressed together

Strona 162 - 10.1 Sleep Function

Chapter 14. Statement Reference236Syntax errors:Run-time errors:NOTEIf you issue KEY statements specifying a same function key, only the lastKEY state

Strona 163 - Chapter 11

237Example:Syntax 1:KEY 1,"a"KEY 2,"F"+CHR$(13)KEY 3,""Syntax 2:KEY 1,"BL60"Reference:Statements:KEY OFF, KEY

Strona 164 - 11.1 Resume Function

Chapter 14. Statement Reference238Syntax:KEY (keynumber){ON|OFF}Parameter:keynumberA numeric expression which returns a value from 1 to 31, 33 to 38,

Strona 165 - Chapter 12

239Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error • keynumber is not enclosed inparentheses ( ).• Neithe

Strona 166 - 12.1 Low Battery Warning

Chapter 14. Statement Reference240Syntax:KILL "[drivename:]filename"Parameter:"[drivename:]filename"A string expression.Descriptio

Strona 167 - 12.3 Wakeup Function

241Example:CLOSEIF kyIn$="Y" THENKILL "Master.Dat"END IFReference:Statements:CLFILE

Strona 168 - 12.4 Remote Wakeup Function

Chapter 2. Development Environment and Procedures172.4 Producing a User Program2.4.1 Starting the BHT-BASIC 3.5 CompilerStart the Compiler, e.g., by c

Strona 169

Chapter 14. Statement Reference242Syntax:Syntax 1 (Loading a user-defined Kanji font):KPLOAD kanjicode, fontarraynameSyntax 2 (Loading a user-defined

Strona 170 - [ 3 ] Remote wakeup program

243• The loaded user-defined fonts are effective during execution of the user programwhich loaded those fonts and during execution of the successive u

Strona 171 - CHAIN statement, the

Chapter 14. Statement Reference244• An array integer variable--a work array, register array, or common array--for cur-sorarrayname should be declared

Strona 172

245• If the double-width, double-height, or quadruple-size is specified, then user-defined cursors loaded by the KPLOAD will display in double-width,

Strona 173 - Chapter 13

Chapter 14. Statement Reference246Example:DIM kp%(15)kp%(0)=&H0000kp%(1)=&H8011kp%(2)=&H6022kp%(3)=&H1844kp%(4)=&H0600kp%(5)=&

Strona 174

247Syntax:Syntax 1:[LET] stringvariable = stringexpressionSyntax 2:[LET] numericvariable = numericexpressionDescription:LET assigns a value of express

Strona 175

Chapter 14. Statement Reference248Syntax:LINE INPUT ["prompt"{,|;}]stringvariableParameter:"prompt"A string constant.stringvariabl

Strona 176 - Chapter 14

249If "prompt" is followed by a comma, the statement displays the prompting mes-sage but no question mark or space is appended to the prompt

Strona 177 - Description:

Chapter 14. Statement Reference250Syntax errors:Reference:Error code and message Meaningerror 71: Syntax error • INPUT is missing.• Neither a comma (,

Strona 178

251Syntax:LINE INPUT #filenumber,stringvariableParameter:filenumberA numeric expression which returns a value from 1 to 16.stringvariableA string vari

Strona 179 - 0123 5678910114

182.4.2 Outline of User Program or Library ProductionProcedureUnlike the BHT-BASIC 3.0 Compiler that converts a single source program into a user prog

Strona 180 - Example:

Chapter 14. Statement Reference252Syntax errors:Run-time errors:Example:LINE INPUT #fileNo,dat$Reference:Error code and message Meaningerror 71: Synta

Strona 181 - Reference:

253Syntax:Syntax 1:LOCATE [column][,row[,cursorswitch]]Syntax 2:LOCATE,,cursorswitchParameter:A numeric expression which returns a value given below.D

Strona 182

Chapter 14. Statement Reference254• The entry ranges of the column and row are the same in the regular-size, double-width, double-height, and quadrupl

Strona 183

255• If the double-height or quadruple-size is specified, specification of the maximumvalue to row moves the cursor off the screen and out of sight.Ex

Strona 184

Chapter 14. Statement Reference256Run-time errors:Example:LOCATE 1,2LOCATE xPos,xCSRLINLOCATE ,,2Reference:Error code Meaning05hParameter out of the r

Strona 185

257Syntax:ON ERROR GOTO labelDescription:ON ERROR GOTO enables error trapping so as to pass control to the first line of anerror-handling routine spec

Strona 186

Chapter 14. Statement Reference258Syntax:Syntax 1:ON expression GOSUB label [,label...]Syntax 2:ON expression GOTO label [,label...]Parameter:expressi

Strona 187

259Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error • label has not been defined.•label is missing.Error c

Strona 188

Chapter 14. Statement Reference260Syntax:ON KEY (keynumber) GOSUB labelParameter:keynumberA numeric expression which returns a value from 1 to 31, 33

Strona 189

261• When using the ON KEY...GOSUB statement together with block-structured state-ments (DEF FN...END DEF, FOR...NEXT, FUNCTION...END FUNCTION,IF

Strona 190

Chapter 2. Development Environment and Procedures192.4.3 Designating a Single Source File or a Project File2.4.3.1 Designating a single source fileJus

Strona 191

Chapter 14. Statement Reference262Syntax:OPEN "[drivename:]filename" AS [#] filenumber [RECORD filelength]Parameter:filenumberA numeric expr

Strona 192

263•filelength is the maximum number of registrable records in a file. It can beset only when a new data file is created by an OPEN statement. If yo

Strona 193

Chapter 14. Statement Reference264Syntax:OPEN "BAR:[readmode][beepercontrol][LEDcontrol]" AS [#]filenumber CODE readcode[,readcode...]Parame

Strona 194

265• Only a single bar code device file can be opened at a time. The total number offiles which can be opened at a time is 16 including data files an

Strona 195

Chapter 14. Statement Reference266Auto-off mode (F)OPEN "BAR:F" AS #7 CODE "A"If you press the trigger switch*1, the illumination

Strona 196

267• If readmode is omitted, the BHT defaults to the auto-off mode.• In the momentary switching mode, alternate switching mode, or continuousreading m

Strona 197

Chapter 14. Statement Reference268 readcode BHT-100QThe BHT supports a total of nine types of codes--four types of 2D codes (QRCode, PDF417, MaxiCode

Strona 198

269The split code scanning mode ("Structured Append") of the QR Code systemcan divide a data string into a maximum of 16 blocks. splitmode a

Strona 199

Chapter 14. Statement Reference270In any of the following cases, the BHT ends the split code scanning sequenceeven in midway. If it happens in the ed

Strona 200

271Universal product codes (A)Syntax :A[:[code][1stchara[2ndchara]] [,[code][1stchara[2ndchara]]] [,[code][1stchara[2ndchara]]]]wherecode is A, B, or

Strona 201

202.4.3.2 Designating a project fileTo build a library out of a single source file or to build a user program or library out of multiplesource files,

Strona 202 - DEF FN (Single-line form)

Chapter 14. Statement Reference272Interleaved 2 of 5 (ITF) (I)Syntax :I[:[mini.no.digits[-max.no.digits]][CD][;[1stchara[2ndchara]]] [,[mini.no.digi

Strona 203

273Codabar (NW-7) (N)Syntax:N[:[mini.no.digits[-max.no.digits]][startstop][CD] [,[mini.no.digits[-max.no.digits]][startstop][CD]] [,[mini.no.digits[-

Strona 204

Chapter 14. Statement Reference274Code 39 (M)Syntax:M[:[mini.no.digits[-max.no.digits]][CD][;[1stchara[2ndchara]]] [,[mini.no.digits[-max.no.digits]]

Strona 205

275Code 128 (K)Syntax :K[:[mini.no.digits[-max.no.digits]][;[1stchara[2ndchara]]] [,[mini.no.digits[-max.no.digits]][;[1stchara[2ndchara]]]] [,[mini.

Strona 206 - (Block form)

Chapter 14. Statement Reference276If the BHT reads any bar code consisting of special characters only (such asFNC, CODEA, CODEB, CODEC and SHIFT chara

Strona 207

277Multi-line code scanningTo scan multi-line codes, specify an ampersand (&) followed by up to threelines of codes to be scanned.Syntax 1:"&

Strona 208

Chapter 14. Statement Reference278A single heading character may also be designated.Example: To scan EAN and ITF (specified with a heading character)

Strona 209

279(6) If the same type of code, same number of digits, and same conditions arespecified to both a single-line scanning and multi-line scanning, then

Strona 210

Chapter 14. Statement Reference280 readcode BHT-100BThe BHT supports seven types of bar codes--the universal product codes, Inter-leaved 2 of 5 (ITF)

Strona 211

281Interleaved 2 of 5 (ITF) (I)Syntax :I[:[mini.no.digits[-max.no.digits]][CD][,[mini.no.digits[-max.no.digits]][CD]][,[mini.no.digits[-max.no.digit

Strona 212

Chapter 2. Development Environment and Procedures21[ 2 ] Select an existing project fileYou may select an existing project file in the Select Project

Strona 213

Chapter 14. Statement Reference282CD is a check digit. Specifying a C to CD makes the Interpreter check barcodes with MOD-16. The check digit is inc

Strona 214

283Code 128 (K)Syntax :K[:[mini.no.digits[-max.no.digits]][,[mini.no.digits[-max.no.digits]]][,[mini.no.digits[-max.no.digits]]]]wheremini.no.digits

Strona 215

Chapter 14. Statement Reference284(4) FNC4An FNC4 converts data encoded by the code set A or B into a set ofextended ASCII-encoded data (128 added to

Strona 216

285Syntax errors:Run-time errors:Error code and message Meaningerror 71: Syntax errorThe number of the specified readcodes exceeds eight.Error code Me

Strona 217

Chapter 14. Statement Reference286Syntax:Syntax 1 (For the direct-connect interface):OPEN "COMn:[baud][,[parity][,[charalength][,[stop-bit][,[RS/

Strona 218

287Description:OPEN "COM:" opens a communications device file and associates it with file-number for allowing input/output activities using

Strona 219

Chapter 14. Statement Reference288 charalengthcharalength is a character length or the number of data bits. It should be 8(default) or 7 bits. stopbi

Strona 220 - FOR...NEXT

289Syntax errors:Run-time errors:Error code and message Meaningerror 71: Syntax error filenumber is missing.Error code Meaning02hSyntax error(The x in

Strona 221

Chapter 14. Statement Reference290Syntax:OUT portnumber,dataParameter:portnumberA numeric expression.dataA numeric expression which returns a value fr

Strona 222 - FUNCTION…END FUNCTION

291Run-time errors:Example:OUT 3,7The above example sets the LCD contrast to the maximum.Reference:Error code Meaning05hParameter out of the range (p

Strona 223

iPrefaceThis manual describes the syntax and development procedure of BHT-BASIC 3.5 which is aprogramming language for developing application programs

Strona 224

22[ 3 ] Add files to a project fileYou may add one or more source files and libraries to a project file at a time.(1) Create a new project (Refer to [

Strona 225

Chapter 14. Statement Reference292Syntax:Syntax 1 (Turning off the power according to the power-off counter):POWER counterSyntax 2 (Turning off the po

Strona 226

293 Turning off the power immediatelyExecution of POWER OFF or POWER 0 immediately turns off the power.• The execution of POWER OFF or POWER 0 deacti

Strona 227

Chapter 14. Statement Reference294Syntax:PRINT [data[CR/LFcontrol...]]Parameter:dataA numeric or string expression.CR/LFcontrolA comma (,) or a semico

Strona 228

295 CR/LFcontrolCR/LFcontrol determines where the cursor is to be positioned after the PRINTstatement executes.• If CR/LFcontrol is a comma (,), the c

Strona 229

Chapter 14. Statement Reference296Syntax errors:Reference:Error code and message Meaningerror 71: Syntax error data contains a comma (,) or semico-lon

Strona 230

297Syntax:PRINT #filenumber[,data[CR/LFcontrol...]]Parameter:filenumberA numeric expression which returns a value from 1 to 16.dataA numeric or string

Strona 231

Chapter 14. Statement Reference298• If CR/LFcontrol is a semicolon (;), the PRINT # statement outputs data with-out adding spaces or control codes.Sta

Strona 232

299Syntax:Syntax 1 (Displaying numbers):PRINT USING "numericformat";expression[CR/LFcontrol [expression]...]Syntax 2 (Displaying strings):PR

Strona 233

Chapter 14. Statement Reference300 numericformatnumericformat is a formatting string consisting of #, decimal point (.), and/or +,each of which causes

Strona 234 - IF...THEN...ELSE...END IF

301 stringformatstringformat is a formatting string consisting of !, @, and/or &&, each of whichcauses a special printing effect as described

Strona 235

Chapter 2. Development Environment and Procedures23[ 4 ] Select files in the active projectFrom files existing in the active project, you may select f

Strona 236

Chapter 14. Statement Reference302 CR/LFcontrolCR/LFcontrol determines where the cursor is to be positioned after the PRINTUSING statement executes.

Strona 237

303Syntax:Syntax 1:PRIVATE varname [,varname...]Syntax 2:PRIVATE DEFREG registerdefinition [,registerdefini-tion...]Parameter:varnamenumericvar [(subs

Strona 238

Chapter 14. Statement Reference304subscriptFor one-dimensional: integerconstantFor two-dimensional:integerconstant,integerconstantWhere integerconstan

Strona 239

305Run-time errors:Reference:Statements: DEFREG, DIM, and GLOBALError code Meaning05hParameter out of the range07hInsufficient memory space(The variab

Strona 240

Chapter 14. Statement Reference306Syntax:PUT [#]filenumber[,recordnumber]Parameter:filenumberA numeric expression which returns a value from 1 to 16.r

Strona 241

307Syntax errors:Run-time errors:Reference:Error code and message Meaningerror 71: Syntax error filenumber is missing.Error code Meaning05hParameter o

Strona 242

Chapter 14. Statement Reference308Syntax:READ variable[,variable...]Parameter:variableA numeric or string variable.Description:READ reads as many data

Strona 243

309If the string data is invalid as numeric data, the READ statement assigns the value0 to the numeric variable.• The number of data values stored by

Strona 244

Chapter 14. Statement Reference310Syntax:Syntax 1:REM commentSyntax 2:’ commentDescription:REM causes the rest of a program line to be treated as a pr

Strona 245

311Syntax:RESTORE [label]Description:RESTORE specifies a DATA statement location where the READ statement shouldstart reading data, according to label

Strona 246 - KEY ON and KEY OFF

24• Main Object display areaThis area shows the name of a main object in a user program if you have selected"User program (PD3)" with the &q

Strona 247

Chapter 14. Statement Reference312Syntax:Syntax 1:RESUME [0]Syntax 2:RESUME NEXTSyntax 3:RESUME labelDescription:RESUME returns control from the error

Strona 248

313Run-time errors:Reference:Error code Meaning14h RESUME without error(RESUME statement occurs outside of an error-handling rou-tine.)Statements:ON E

Strona 249

Chapter 14. Statement Reference314Syntax:RETURNDescription:RETURN statement in a subroutine returns control to the statement immediately fol-lowing th

Strona 250

315Syntax:Syntax 1:SCREEN displaymode[,charaattribute]Syntax 2:SCREEN ,charaattributeParameter:displaymode and charaattributeA numeric expression whic

Strona 251

Chapter 14. Statement Reference316charaattribute sets the tone, character enlargement, and font reverseattributes as listed below.Tone attributeCharac

Strona 252

317charaattribute is expressed with a bit array as shown below.• At the start of program execution, the following settings apply:• If displaymode or

Strona 253

Chapter 14. Statement Reference318Example:mode% = .scMB+.scSmall ’Kanji mode, small-size fontattrib% = .scW2H1+.scDGray ’Double-width, dark graySCREEN

Strona 254

319Syntax:SELECT conditionalexpressionCASE test1[statementblock][CASE test2[statementblock]]...[CASE ELSE[statementblock]]END SELECTParameter:conditio

Strona 255

Chapter 14. Statement Reference320• You can nest the SELECT…CASE…END SELECT statements to a maximum of10 levels.SELECT a CASE 1 SELECT b

Strona 256 - LINE INPUT

321Syntax:Syntax 1 (Defining a numeric function):SUB subname [(dummyparameter[,dummyparameter]...)]Syntax 2 (Exiting from the function block premature

Strona 257

Chapter 2. Development Environment and Procedures252.4.4 Compiling and BuildingFirst specify the options and then proceed to the compiling or building

Strona 258

Chapter 14. Statement Reference322Description: Creating a user-defined functionSUB...END SUB creates a user-defined function. The function definiti

Strona 259 - LINE INPUT #

323Syntax errors: When defining a user function When calling a user-defined functionError code and message Meaningerror 64: Function redefinitionYou

Strona 260

Chapter 14. Statement Reference324Run-time errors:Reference:Statements: DECLAREExample:File 1 File 2DECLARE SUB add(x,y) SUB add(X,Y)A=1:B=2 PRINT X+Y

Strona 261

325Syntax:WAIT portnumber,ANDbyte[,XORbyte]Parameter:portnumberA numeric expression.ANDbyte and XORbyteA numeric expression which returns a value from

Strona 262 - This cursor is visible

Chapter 14. Statement Reference326Syntax errors:Run-time errors:Example:WAIT 0,&H03The above statement suspends a user program until any data is i

Strona 263 - PRINT “A”;

327Syntax:WHILE conditionalexpression [statementblock]WENDDescription:A WHILE...WEND continues to execute statementblock as long as the con-ditio

Strona 264

Chapter 14. Statement Reference328Syntax errors:Reference:Error code and message Meaningerror 26: Too deep nesting.error 57: Incorrect use of WHILE...

Strona 265 - ON ERROR GOTO

329Syntax:XFILE "[drivename:]filename"[,"protocolspec"]Parameter:"[drivename:]filename" and "protocolspec"Stri

Strona 266 - ON...GOSUB and ON...GOTO

Chapter 14. Statement Reference330- Transmission directionExample: XFILE "d2.dat","R""filename" cannot be omitted even

Strona 267

331- Timeout length when a link will be establishedSpecify the timeout length by 1 to 9.Example: XFILE "d2.dat","2"In file recept

Strona 268 - ON KEY...GOSUB

26[ 2 ] CompilingIn any of the following methods, compile the currently selected source file(s) into an objectfile(s): From the Build menu, choose th

Strona 269

Chapter 14. Statement Reference332• A communications device file should be opened before execution of the XFILEstatement. (For the file opening, refe

Strona 270

333Run-time errors:Example:The sample below transmits a data file by adding a serial number and horizontalparity checking, and then displays the seria

Strona 271

Chapter 14. Statement Reference334Syntax:Syntax 1:REM $INCLUDE:’filename’Syntax 2:’$INCLUDE:’filename’Description:$INCLUDE reads a source program spec

Strona 272 - OPEN "BAR:"

335Fatal Error:Error code and message Meaningfatal error 30: Cannot find include file "XXX"No included file is found.fatal error 31: Cannot

Strona 273

Chapter 14. Statement Reference336Additional Explanation for Statements Effective range of labelsLabels are effective only in a file. Definition of

Strona 274

337Chapter 15Function ReferenceCONTENTSABS ...338ASC ...

Strona 275

Chapter 15. Function Reference338Syntax:ABS(numericexpression)Description:ABS returns the absolute value of numericexpression. The absolute value ist

Strona 276

339Syntax:ASC(stringexpression)Description:ASC returns the ASCII code value of the first character of stringexpression,which is an integer from 0 to 2

Strona 277

Chapter 15. Function Reference340Syntax:BCC$(datablock,checktype)Parameter:datablockA string expression.checktypeA numeric expression which returns a

Strona 278

341Run-time errors:Error code Meaning05hParameter out of the range (checktype is out of the range.)

Strona 279

Chapter 2. Development Environment and Procedures272.4.5 Setting the Editor for Displaying FilesSet the editor that you want to use for displaying sou

Strona 280

Chapter 15. Function Reference342Syntax:CHKDGT$(barcodedata,CDtype)Parameter:barcodedata and CDtypeString expressions.Description:CHKDGT$ calculates a

Strona 281

343Sample coding 4:CD.Data$=CHKDGT$("a123Qa","N")"Q" is a CD position character, so CHKDGT$ calculates thecorrect CD and

Strona 282

Chapter 15. Function Reference344 When CDtype is I (ITF), the length of barcodedata must be an even num-ber of two or more digits. If not, CHKDGT$ r

Strona 283

345 When CDtype is N (Codabar), the length of barcodedata must be three dig-its or more including start and stop characters. If not, CHKDGT$ returns

Strona 284 - OPEN statement

Chapter 15. Function Reference346Syntax:CHR$(characode)Parameter:characodeA numeric expression which returns a value from 0 to 255.Description:CHR$ co

Strona 285

347• To display a Kanji code, use a shift JIS code as shown below. The shift JIS codefor is 8ABFh.SCREEN 1PRINT CHR$(&h8A);CHR$(&hBF)Referenc

Strona 286

Chapter 15. Function Reference348Syntax:Syntax 1 (Setting a national character set):COUNTRY$="countrycode"Syntax 2 (Returning a country code

Strona 287 - "A:A12"

349• After setting a national character set, you may display national charactersassigned to 32 (20h) to 127 (7Fh), on the LCD.•"countrycode"

Strona 288

Chapter 15. Function Reference350Syntax:CSRLINDescription:CSRLIN returns the current row number of the cursor as an integer in the currentdisplay mode

Strona 289

351Syntax:Syntax 1 (Retrieving the current system date):DATE$Syntax 2 (Setting the current system date):DATE$="date"Parameter:dateA string e

Strona 290

282.4.6 Error Messages and Their Indication onto theMain Window[ 1 ] Selecting either an editor or main window as an error message outputdeviceAccordi

Strona 291

Chapter 15. Function Reference352Run-time errors:Reference:Error code Meaning05hParameter out of the range (date is out of the range.)Functions:TIME$

Strona 292

353Syntax:EOF([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:EOF tests for an end of a device I

Strona 293

Chapter 15. Function Reference354Run-time errors:Reference:Error code Meaning34hBad file name or number(You specified filenumber of an unopened file.)

Strona 294 - OPEN "COM:"

355Syntax:ERLDescription:ERL returns the current statement location of the program where a run-time erroroccurred most recently.• The ERL function wor

Strona 295

Chapter 15. Function Reference356Syntax:ERRDescription:ERR returns the code of a run-time error that invoked the error-handling routine.• The returned

Strona 296

357Syntax:Syntax 1 (Changing the value of a terminator):ETX$=stringexpressionSyntax 2 (Returning the current value of a terminator):ETX$Parameter:stri

Strona 297

Chapter 15. Function Reference358Syntax:FRE(areaspec)Parameter:areaspecA numeric expression which returns a value from 0 to 3.Description:FRE returns

Strona 298

359Syntax:HEX$(numericexpression)Parameter:numericexpressionA numeric expression which returns a value from -32768 to 32767.Description:HEX$ function

Strona 299

Chapter 15. Function Reference360Syntax:INKEY$Description:INKEY$ reads from the keyboard to see whether a key has been pressed, andreturns one charact

Strona 300

361Syntax:INP(portnumber)Parameter:portnumberA numeric expression which returns a value from 0 to 32767.Description:INP reads one-byte data from an in

Strona 301

Chapter 2. Development Environment and Procedures29[ 2 ] How error messages are displayed on the editor or main windowDuring building, the BHT-BASIC 3

Strona 302

Chapter 15. Function Reference362Syntax:Syntax 1 (Reading from the keyboard):INPUT$(numcharas)Syntax 2 (Reading from a device file):INPUT$(numcharas,[

Strona 303

363Run-time errors:Reference:Error code Meaning05hParameter out of the range (numcharas is out of the range.)34hBad file name or number(You specified

Strona 304

Chapter 15. Function Reference364:Syntax:INSTR([startposition,]targetstring,searchstring)Parameter:startpositionA numeric expression which returns a v

Strona 305

365• A returned value of INSTR is a decimal number from 0 to 255, depending uponthe conditions as listed below.Run-time errors:Reference:Conditions Re

Strona 306

Chapter 15. Function Reference366Syntax:INT(numericexpression)Parameter:numericexpressionA real expression.Description:INT returns the largest whole n

Strona 307 - PRINT USING

367Syntax:LEFT$(stringexpression,stringlength)Parameter:stringlengthA numeric expression which returns a value from 0 to 255.Description:LEFT$ extract

Strona 308

Chapter 15. Function Reference368Syntax:LEN(stringexpression)Description:LEN returns the length of stringexpression, that is, the number of bytes inth

Strona 309

369Syntax:LOC([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:LOC returns the current position w

Strona 310

Chapter 15. Function Reference370Run-time errors:Reference:Error code Meaning34hBad file name or number(You specified filenumber of an unopened file.)

Strona 311

371Syntax:LOF([#]filenumber)Parameter:filenumberA numeric expression which returns a value from 1 to 16.Description:LOF returns the length of a data f

Strona 312

302.4.7 OptionsTo specify compiling options and linking options, select the check-box options you want in theSet Options dialog box. Each of availabl

Strona 313

Chapter 15. Function Reference372Syntax:MARK$Description:BHT-100QMARK$ returns a maximum of 9 bytes of string in the format below. The first onebyte r

Strona 314

373• The first one byte of a returned value contains one of the following letters repre-senting code types:• The remaining two bytes of a returned val

Strona 315

Chapter 15. Function Reference374Syntax:MID$(stringexpression,startposition[,stringlength])Parameter:startpositionA numeric expression which returns a

Strona 316

375Run-time errors:Reference:Error code Meaning05hParameter out of the rangeFunctions:LEFT$, LEN, and RIGHT$

Strona 317

Chapter 15. Function Reference376Syntax:POS(0)Description:POS returns the current column number of the cursor in the current display modeselected by a

Strona 318

377Syntax:RIGHT$(stringexpression,stringlength)Parameter:stringlengthA numeric expression which returns a value from 0 to 255.Description:Starting at

Strona 319

Chapter 15. Function Reference378Syntax:SEARCH([#]filenumber,fieldvariable,searchdata[,startrecord])Parameter:filenumberA numeric expression which ret

Strona 320

379Run-time errors:Reference:Error code Meaning05hParameter out of the range34hBad file name or number(You specified filenumber of an unopened file.)3

Strona 321

Chapter 15. Function Reference380Syntax:Syntax 1 (Changing the value of a header):SOH$=stringexpressionSyntax 2 (Returning the current value of a head

Strona 322

381Syntax:STR$(numericexpression)Parameter:numericexpressionA numeric expression.Description:STR$ converts the value of numericexpression into a strin

Strona 323

Chapter 2. Development Environment and Procedures31[ 2 ] Linking options[ 3 ] Outputting debug information filesIf you select the "Debug informat

Strona 324

Chapter 15. Function Reference382Syntax:Syntax 1 (Changing the value of a header):STX$=stringexpressionSyntax 2 (Returning the current value of a head

Strona 325

383Syntax:Syntax 1 (Retrieving the current system time or wakeup time):TIME$Syntax 2 (Setting the current system time or wakeup time):TIME$="time

Strona 326

Chapter 15. Function Reference384 Syntax 2Setting the system timeTIME$ sets the system time specified by "time." The format of "time&

Strona 327 - SELECT...CASE...END SELECT

385Syntax:Syntax 1 (Retrieving the current value of a specified timer):TIMEATIMEBTIMECSyntax 2 (Setting a specified timer):TIMEA=countTIMEB=countTIMEC

Strona 328

Chapter 15. Function Reference386Syntax:VAL(stringexpression)Parameter:stringexpressionA string expression which represents a decimal number.Descripti

Strona 329 - SUB...END SUB

387Chapter 16Extended FunctionsCONTENTS16.1 Overview...

Strona 330

38816.1 OverviewIn addition to the BHT-BASIC statements and functions, the BHT-100 series supports the fol-lowing extended functions which can be invo

Strona 331

Chapter 16. Extended Functions38916.2 Reading or writing system set-tings from/to the memory (SYSTEM.FN3)16.2.1 Function Number List of SYSTEM.FN3The

Strona 332

39016.2.2 Detailed Function SpecificationsSyntax: CALL "SYSTEM.FN3" .fcSysIGet PARA%,DATA%Description:This function reads numeric data (DATA

Strona 333

Chapter 16. Extended Functions391.syCmifApl 12 Default interface to be used for user pro-gramsR/W .syCmifOpt 0 IrDA interface 0.syCmifCon 1 Direct-con

Strona 334

iiHow this book is organizedThis manual is made up of 18 chapters and appendices.Chapter 1. Software Overview for the BHTSurveys the software structur

Strona 335 - WHILE...WEND

32[ 4 ] Outputting list files The Compiler may output three types of list files as listed below depending upon the optionsspecified at the start of co

Strona 336

392.syHPrtyOp 23 Horizontal parity for IrDA interfaceR/W .syHPtyOff 0 No parity (OFF) 1.syHPtyOn 1 Add (ON).syLnkTmOp 24 Timeout for data link establi

Strona 337

Chapter 16. Extended Functions393*1R/W: Read and write possible RO: Read onlyNote: Items #41 through #46 take effect only when the LAN communica-tions

Strona 338

394Syntax: CALL "SYSTEM.FN3" .fcSysISet PARA%,DATA%Description:This function writes numeric data (DATA%) to the system menu item specified b

Strona 339

Chapter 16. Extended Functions395Note: Items #9 through #11 take effect only when the LAN communicationssoftware is installed to the BHT. Before using

Strona 340

396Syntax: CALL "SYSTEM.FN3" .fcFontInf N.FONT%,VERSION$()Description:This function returns font information--the number of downloaded fonts

Strona 341

Chapter 16. Extended Functions397Syntax: CALL "SYSTEM.FN3" .fcCLkGet STATE%Description: This function returns the link status (STATE%) of th

Strona 342 - $INCLUDE

398Syntax: CALL "SYSTEM.FN3" .fcCMdRqstDescription: This function places the LAN-support CU in system reconfigurationmode.Parameter: (None)R

Strona 343 - Fatal Error:

Chapter 16. Extended Functions39916.3 Controlling the LCD and Touch Screen (CONSOLE.FN3)16.3.1 Function Number List of CONSOLE.FN3.Function number Use

Strona 344 - DEFREG statement)

40016.3.2 Detailed Function SpecificationsSyntax: CALL "CONSOLE.FN3" .fcDot POINT%(),ATTRIB%, COLOR%Description:This function draws a dot on

Strona 345 - Chapter 15

Chapter 16. Extended Functions401Syntax: CALL "CONSOLE.FN3" .fcLine RECT%(),ATTRIB%, COLOR%Description:This function draws a full line betwe

Strona 346

Chapter 2. Development Environment and Procedures33• Address of object program in intermediate languageShows an intermediate language address correspo

Strona 347

402Syntax: CALL "CONSOLE.FN3" .fcDtLine RECT%(),PTN%, ATTRIB%,COLOR%Description:This function draws a dotted line specified by PTN% between

Strona 348

Chapter 16. Extended Functions403Run-time errors:Example:Drawing a dotted line starting at the coordinates (10, 30) to (100, 60) in blackDIM RECT%(3)R

Strona 349

404Parameter: RECT%() Coordinates to define a rectangleATTRIB% Drawing attributes**COLOR% is valid only when "0" is set to ATTRIB%.Returned

Strona 350

Chapter 16. Extended Functions405Syntax: CALL "CONSOLE.FN3" .fcRect RECT%(),ATTRIB%, COLOR%Description:This function draws a rectangle defin

Strona 351

406Run-time errors:Example:Drawing a rectangle defined by two diagonal points (3, 3) and (94, 40)DIM RECT%(3)RECT%(0)=3 : RECT%(1)=3 : RECT%(2)=94 : R

Strona 352

Chapter 16. Extended Functions407Syntax: CALL "CONSOLE.FN3" .fcFKey DATA%Description:This function sets the number of function touch keys sp

Strona 353

408ATTRIB% Character attributesReturned value: (None)Run-time errors:Syntax: CALL "CONSOLE.FN3" .fcUKey KEYNO%,KEYDATA$, RECT%(),DSPDATA$,FO

Strona 354

Chapter 16. Extended Functions409ATTRIB% Character attributesReturned value: (None)Run-time errors:Syntax: CALL "CONSOLE.FN3" .fcUKeyEnd KEY

Strona 355

410Syntax: CALL "CONSOLE.FN3" .fcPnlGet POINT%()Description:This function returns the coordinates that is pressed last.Parameter: (None)Retu

Strona 356 - COUNTRY$

Chapter 16. Extended Functions41116.4 Controlling system files (SYSMDFY.FN3)16.4.1 Function Number List of SYSMDFY.FN3The SYSMDFY.FN3 may reconfigure

Strona 357

34• Symbol table for common variablesLists common variables arranged according to their types. An array variable has a suffixof parentheses ( ).• Sym

Strona 358

41216.4.2 Detailed Function SpecificationsSyntax: CALL "SYSMDFY.FN3" .fcMdBVGet FILE$, VERSION$Description:This function returns the version

Strona 359

Chapter 16. Extended Functions413Syntax: CALL "SYSMDFY.FN3" .fcMdBNGet FILE$Description:This function returns the filename of the BHT system

Strona 360

414Syntax: CALL "SYSMDFY.FN3" .fcMdCDo FILE$Description:This function reconfigures the LAN-support CU system by using theLAN-support CU syst

Strona 361

Chapter 16. Extended Functions41516.5 Calculating a CRC (CRC.FN3)16.5.1 Function Number List of CRC.FN3The CRC.FN3 may calculate a CRC depending upon

Strona 362

416Syntax: CALL "CRC.FN3" .fcCrc16 STRING1$, [ STRING2$, [...,]] CRC$Description:This function calculates a CRC of character strings specifi

Strona 363

417Chapter 17 Spread Spectrum Communication(For models equipped with a spread spectrum wireless block)CONTENTS17.1 Overview...

Strona 364

41817.1 Overview Spread spectrum communications deviceThe BHT system consists of BHT main system and the spread spectrum communicationsdevice; the fo

Strona 365

Chapter 17. Spread Spectrum Communication (For models equipped with a spread spectrum wireless block)419The table below shows the communications statu

Strona 366

42017.2 Programming for Spread Spec-trum CommunicationWhen programming for spread spectrum communication, use the following statement andextension fun

Strona 367

Chapter 17. Spread Spectrum Communication (For models equipped with a spread spectrum wireless block)42117.3 Spread Spectrum Communica-tions-related S

Strona 368

Chapter 2. Development Environment and Procedures35[ 5 ] Outputting a mapfileSelect the Mapfile check box of the Linking Options in the Set Options di

Strona 369

42217.4 Spread Spectrum Communica-tion Library (SS.FN3)17.4.1 OverviewThe spread spectrum communication library (SS.FN3) used in a BHT-BASIC CALL stat

Strona 370

Chapter 17. Spread Spectrum Communication (For models equipped with a spread spectrum wireless block)42317.4.2 Detailed Function SpecificationsSyntax:

Strona 371

424Syntax: CALL "SS.FN3" .fcParaSGet PARA%,DATA$Description:This function reads string (DATA$) from the wireless block setting speci-fied by

Strona 372

Chapter 17. Spread Spectrum Communication (For models equipped with a spread spectrum wireless block)425Syntax: CALL "SS.FN3" .fcParaISet PA

Strona 373

426Syntax: CALL "SS.FN3" .fcParaSSet PARA%,DATA$Description:This function writes string (DATA$) to the wireless block setting specifiedby PA

Strona 374

Chapter 17. Spread Spectrum Communication (For models equipped with a spread spectrum wireless block)427Syntax: CALL "SS.FN3" .fcSyncInf TIM

Strona 375

428Chapter 18 TCP/IP(BHTs with spread spectrum communications device or BHTs designed for LAN-support software)CONTENTS18.1 Two Sides...

Strona 376

Chapter 18. TCP/IP42918.5 FTP Client... 45918.5.1 Ov

Strona 377

43018.1 Two Sides18.1.1 BHTThe BHT equipped with a spread spectrum communications device or IrDA communicationsdevice includes two built-in libraries

Strona 378

Chapter 18. TCP/IP43118.2 TCP/IP over Spread Spectrum System18.2.1 General ProcedureThe following is the procedure for using TCP/IP over a spread spec

Strona 379

36• Map for user-defined functionsShows the symbols of user-defined functions in the Interpreter which are arrangedaccording to their types (i.e., int

Strona 380

432[ 2 ] Configure TCP/IP SystemTo connect to the TCP/IP pathway, specify the following system settings in System Mode or byusing the extension librar

Strona 381 - LOC function

Chapter 18. TCP/IP433[ 3 ] Declare TCP/IP Communications PathwaySpecify the following system settings by using the socket library (SOCKET.FN3):• Commu

Strona 382

434[ 5 ] Check Spread Spectrum Communications Device Syn-chronization with MasterUsing a spread spectrum communications device for TCP/IP communicatio

Strona 383

Chapter 18. TCP/IP435[ 6 ] Connect to TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Connecting to the TCP/IP communications pathw

Strona 384

436[ 8 ] Disconnect TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Refer to Section 18.6, "Socket Library(SOCKET.FN3)."G

Strona 385

Chapter 18. TCP/IP43718.2.2 Programming Notes for Socket API Accordingto UDPThe user datagram protocol (UDP) has no flow control, so send/receive data

Strona 386

438 Host’s retransmission control for a transmission errorAssume that the host uses the protocol of receiving transmission completion message from the

Strona 387

Chapter 18. TCP/IP43918.2.3 Programming Notes for TCP/IP Communica-tionIf TCP/IP communication becomes no longer possible during data transmission, an

Strona 388

440 Note for run-time error 105hSocket close processing (SOCKET.FN3, Function #28) following occurrence of run-time error105h would not complete immed

Strona 389

Chapter 18. TCP/IP44118.2.4 Sample Programmain: ’ Main programon error goto Err.TCP ’ Prepare for error interrupt (To Err.TCP ’ at the time of error o

Strona 390

Chapter 2. Development Environment and Procedures372.4.8 Starting the BHT-BASIC Compiler from theCommand LineYou may start the BHT-BASIC Compiler from

Strona 391

44218.3 TCP/IP over IrDA CommunicationSystem18.3.1 General ProcedureThe following is the procedure for using TCP/IP over an IrDA communications device

Strona 392

Chapter 18. TCP/IP443[ 2 ] Configure TCP/IP SystemTo connect to the TCP/IP pathway, specify the following system settings in System Mode or byusing th

Strona 393 - TIMEA/TIMEB/TIMEC

444[ 3 ] Declare TCP/IP Communications PathwaySpecify the following system settings by using the socket library (SOCKET.FN3):• Communications device:

Strona 394

Chapter 18. TCP/IP445[ 5 ] Connect to TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Connecting to the TCP/IP communications pathw

Strona 395 - Extended Functions

446[ 7 ] Disconnect TCP/IP Communications PathwayUse the extension library SOCKET.FN3. Refer to Section 18.6, "Socket Library(SOCKET.FN3)."G

Strona 396 - 16.1 Overview

Chapter 18. TCP/IP44718.3.2 Programming Notes for Socket API Accordingto UDPRefer to Subsection 18.2.2.18.3.3 Programming Notes for TCP/IP Communica-t

Strona 397 - (SYSTEM.FN3)

44818.3.4 Sample ProgramGiven below is a sample program that shows only the skeleton of communication program andrequires modification in actual progr

Strona 398 - RO: Read only

Chapter 18. TCP/IP449TCP.STTS% = 3’Convert IP address <----- Equivalent to BSD4.4 socket API inet_addr() functionIPADDRESS$ = "192.100.100.001

Strona 399

450TCP.STTS% = 2’Disconnect TCP/IP communications pathwayCALL "SOCKET.FN3" .fcTDiscnn INTERFACE%TCP.STTS% = 1’Close IrDA communications devi

Strona 400

Chapter 18. TCP/IP45118.4 Socket API18.4.1 OverviewThe SOCKET.FN3 library implements a subset of the BSD4.4 socket application programinterface (API).

Strona 401

38[ 2 ] OptionsThe BHT-BASIC 3.5 Compiler supports three types of options—compiler processing options,compiling options, and linking option. Compiler

Strona 402

452 User Datagram Protocol (UDP)socket()bind() sendto()select()recvfrom() close()socket()bind()(listen ())select()recvfrom()sendto()

Strona 403

Chapter 18. TCP/IP45318.4.2 Client Program Samples for Socket API According to TCP and UDPThis section gives TCP and UDP client program samples. With

Strona 404 - 8 bytes 2 bytes 8 bytes

454’Initialize socket identifier set ’<----- Equivalent to BSD4.4 socket API FD_ZERO macroCALL "SOCKET.FN3" .fcFDZERO R.SOCKSET$ ’Initial

Strona 405 - .syLkNoRes

Chapter 18. TCP/IP455 UDP client program (non-connection type)(Example)’****************************************’ Data Section

Strona 406

456’Add socket identifier to the read socket identifier set’<----- Equivalent to BSD4.4 socket API FD_SET macroCALL "SOCKET.FN3" .fcFDSET

Strona 407 - Screen (CONSOLE.FN3)

Chapter 18. TCP/IP45718.4.3 Programming Notes for Socket APISocket API according to the TCP/IP is restricted by the following specifications. For thee

Strona 408 - .fcDot Draw a dot

458 sendlen%=255 sendmode%=0 call "socket.fn3" .fcSend sockfd%, sendbuff$, sendlen%, sendmode%, sendsize%’Transmit data’Use SOCKET.FN3 fu

Strona 409 - .fcLine Draw a full line

Chapter 18. TCP/IP45918.5 FTP Client18.5.1 OverviewThe FTP.FN3 library implements FTP client services for file transfers to and from FTP servers.Note

Strona 410 - .fcDtLine Draw a dotted line

460The FTP client automatically pads the last record of a downloaded program file with null codes(00h) to maintain the fixed-length format. (The numbe

Strona 411

Chapter 18. TCP/IP461[ 2 ] Extension Libraries (*.FN3 and *.EX3)The FTP client treats files with extensions .FN3 and .EX3 as extension libraries.Exten

Strona 412

Chapter 2. Development Environment and Procedures39 Compiling options Linking optionCompiling options Description+DOutputs debug information files (

Strona 413 - .fcRect Draw a rectangle

462[ 3 ] Data FilesThe FTP client treats files with extensions other than .PD3, .FN3, and .EX3 as data files.Data file records consist of fields separ

Strona 414 - .fcDotGet Get drawn dot state

Chapter 18. TCP/IP463The treatment of short records is under application control. The default is to delete any trailingspaces (20h).Alternatively, the

Strona 415

464Line delimiters inside data recordsThe FTP client can send and receive all codes from 00h to FFh as described above. The treat-ment of line delimit

Strona 416

Chapter 18. TCP/IP46518.5.3 Using FTP Client[ 1 ] Basic ProcedureFirst, set up for using the FTP client, as necessary, with the following steps. All t

Strona 417 - .cnW2H2 3 Quadruple-size

466[ 3 ] Calculating Memory RequirementsThe FTP protocol specifications do not provide for checking the amount of BHT memory avail-able during downloa

Strona 418 - .fcLcdClr Clear the LCD

Chapter 18. TCP/IP467 Data FilesDetermine MEM from the field lengths and number of records.BPR = bytes per record = (number of fields) + (sum of fiel

Strona 419 - (SYSMDFY.FN3)

46818.6 Socket Library (SOCKET.FN3)18.6.1 Overview String VariablesThe following are the string variables used by this library together with their me

Strona 420

Chapter 18. TCP/IP469 Function Number ListNumber Used to:Corresponding Socket API Function.fcAccept 1* –– accept().fcBind 2 Assign address to socket

Strona 421

470* Socket API function not supported by SOCKET.FN3 library..fcSocket 26 Create socket socket().fcWritev 27* –– writev().fcClose 28 Close socket clos

Strona 422

Chapter 18. TCP/IP47118.6.2 Detailed Function SpecificationsSyntax: CALL "SOCKET.FN3" .fcBind SOCKFD%, FAMILY%, PORT%, addresswhere address

Strona 423

40[ 3 ] Error Level Indication by ERRORLEVELIf you specify a +E option at the command line and run the BHT-BASIC 3.5 Compiler, theERRORLEVEL of MS-DOS

Strona 424 - .fcCrc16 Calculate a CRC-16

472Syntax: CALL "SOCKET.FN3" .fcConnect SOCKFD%, FAMILY%, PORT%, addresswhere address is ADDRESS or IPADDRESS$Description: This function con

Strona 425 - Chapter 17

Chapter 18. TCP/IP473Syntax:CALL "SOCKET.FN3" .fcGSckOpt SOCKFD%, OPTNAME%, optionwhere option is OPTION% or OPTIONDescription: This functio

Strona 426 - PWBS C SF

474Syntax: CALL "SOCKET.FN3" .fcHToNL HOSTLONG, NETLONGDescription: This function converts a (4-byte) long from host byte order to network b

Strona 427

Chapter 18. TCP/IP475Syntax:CALL "SOCKET.FN3" .fcNToHS NETSHORT%, HOSTSHORT%Description: This function converts a (2-byte) short from networ

Strona 428 - FTP.FN3) for file transfer

476Run-time errors:Example: Append operationIncoming data: 1024 bytes ("0123456789...0123")Receive buffer: 8 elements, 128 characters

Strona 429

Chapter 18. TCP/IP477• After receiving first 512 bytes• After receiving remaining 512 bytesElement 0Element 7‘0’• • • • • • • •[ Strings

Strona 430 - 17.4.1 Overview

478Example: Overwrite operationIncoming data: 1024 bytes ("0123456789...0123")Receive buffer: 8 elements, 128 characters each for a t

Strona 431

Chapter 18. TCP/IP479Syntax:CALL "SOCKET.FN3" .fcRcvfrom SOCKFD%, RECVBUFF$[()], RECVLEN%, RECVMODE%, FAMILY%, PORT%, address, RECVSIZE% [,R

Strona 432

480Run-time errors:Error code Meaning105hPower-off detected106hAn internal error has occurred in the TCP/IP module during datatransmission.107hThe TCP

Strona 433

Chapter 18. TCP/IP481Syntax:CALL "SOCKET.FN3" .fcSelect MAXFD%, READFDSET$, WRITEFDSET$, EXCEPTFDSET$, TIMEOUT, RESULT%Description: This fun

Strona 434

Chapter 2. Development Environment and Procedures412.4.9 Output from the BHT-BASIC 3.5 CompilerThe BHT-BASIC 3.5 Compiler outputs the following inform

Strona 435

482Syntax:CALL "SOCKET.FN3" .fcFDZERO SOCKFDSET$Description: This function initializes the specified socket identifier set.BSD4.4 socket API

Strona 436 - Chapter 18

Chapter 18. TCP/IP483Syntax:CALL "SOCKET.FN3" .fcFDISSET SOCKFD%, SOCKFDSET$, FDISSET%Description: This function gets the status of the spec

Strona 437

484Run-time errors:Error code Meaning105hPower-off detected106hAn internal error has occurred in the TCP/IP module during datatransmission.107hThe TCP

Strona 438 - 18.1 Two Sides

Chapter 18. TCP/IP485Syntax:CALL "SOCKET.FN3" .fcSendto SOCKFD%, SENDBUFF$[()], SENDLEN%, SENDMODE%, FAMILY%, PORT%, address, SENDSIZE%where

Strona 439 - 18.2.1 General Procedure

486Syntax: CALL "SOCKET.FN3" .fcSSckOpt SOCKFD%, OPTNAME%, optionwhere option is OPTION% or OPTIONDescription: This function sets the specif

Strona 440 - [ 2 ] Configure TCP/IP System

Chapter 18. TCP/IP487Syntax:CALL "SOCKET.FN3" .fcShutdwn SOCKFD%, HOWTO%Description: This function shuts down socket transfers in the specif

Strona 441

488Syntax:CALL "SOCKET.FN3" .fcSocket FAMILY%, TYPE%, PROTOCOL%, SOCKFD%Description: This function creates a socket from the specified proto

Strona 442

Chapter 18. TCP/IP489Syntax:CALL "SOCKET.FN3" .fcClose SOCKFD%Description: This function closes the specified socket identifier.BSD4.4 socke

Strona 443

490Syntax: CALL "SOCKET.FN3" .fcTSetup IFTYPE%, LAYERMODE%, INTERFACE%Description: This function specifies the TCP/IP communications pathway

Strona 444

Chapter 18. TCP/IP491Syntax:CALL "SOCKET.FN3" .fcTCnnSys INTERFACE%Description: This function connects the TCP/IP communications pathway bas

Strona 445

iiiChapter 12. Power-related FunctionsDescribes low battery warning, the prohibited simultaneous operation of the beeper/illumina-tion LED, the wakeup

Strona 446

42XXX represents a source program filename.YYY represents a project name.Address–Source listFile XXX.LST (in the direc-tory where the source pro-gram

Strona 447

492Syntax:CALL "SOCKET.FN3" .fcTCnnUsr INTERFACE%, IPADDRESS$, SUBNETMASK$, GATEWAY$Description: This function connects the TCP/IP communica

Strona 448 - Note for run-time error 105h

Chapter 18. TCP/IP493Syntax:CALL "SOCKET.FN3" .fcTDiscnn INTERFACE%Description: This function disconnects the specified TCP/IP communication

Strona 449 - 18.2.4 Sample Program

494Syntax:CALL "SOCKET.FN3" .fcTSysSet PARA%, datawhere data is DATA% or DATA$Description: This function sets the specified TCP/IP system se

Strona 450 - 18.3.1 General Procedure

Chapter 18. TCP/IP49518.7 FTP Library (FTP.FN3)18.7.1 Overview String VariablesThe following are the string variables used by this library together w

Strona 451

496 Reply CodesThe messages that FTP servers send during and after FTP operations vary, but servers alluse the same reply codes. (See Table.) All func

Strona 452

Chapter 18. TCP/IP497426 Connection closed; transfer aborted.450 Requested file action not taken.File unavailable (e.g., file busy).451 Requested acti

Strona 453

49818.7.2 Detailed Function SpecificationsSyntax: CALL "FTP.FN3" .fcFTPOpnS FTPHANDLE%, REPLY%Description: This function opens an FTP client

Strona 454

Chapter 18. TCP/IP499Syntax:CALL "FTP.FN3" .fcFTPOpnU FTPHANDLE%, SERV.IP$, USERNAME$, PASSWORD$, REPLY%Description: This function opens an

Strona 455

500Syntax: CALL "FTP.FN3" .fcFTPClos FTPHANDLE%, REPLY%Description: This function closes the specified FTP client session.Parameters:FTPHAND

Strona 456 - 18.3.4 Sample Program

Chapter 18. TCP/IP501Syntax:CALL "FTP.FN3" .fcPWD FTPHANDLE%, CURDIR$, REPLY%Description: This function gets the current directory on the FT

Strona 457 - Chapter 18. TCP/IP

Chapter 2. Development Environment and Procedures432.4.10 Structure of User Programs and LibrariesIf you specify a user program to be produced in the

Strona 458

502Syntax:CALL "FTP.FN3" .fcCWD FTPHANDLE%, NEWDIR$, REPLY%Description: This function changes the current directory on the FTP server.Parame

Strona 459 - 18.4 Socket API

Chapter 18. TCP/IP503Syntax:CALL "FTP.FN3" .fcRETR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, CRLF.MODE%, REPLY% [,FLD$] [,DISP.MODE%

Strona 460

504FLD$ Field lengths in bytes. Delimit the field length specifi-cations with commas (,) or semicolons (;). (Thisparameter applies only to downloaded

Strona 461 - According to TCP and UDP

Chapter 18. TCP/IP505Run-time errors:Error code Meaning02hSyntax error (Incorrect file name)05hNumber of field items or number of digits in a field ou

Strona 462

506Syntax: CALL "FTP.FN3" .fcSTOR FTPHANDLE%, SERV.FNAME$, CLNT.FNAME$, CRLF.TYPE%, UP.MODE%, REPLY% [,DISP.MODE%]Description: This function

Strona 463 - (Example)

Chapter 18. TCP/IP507Run-time errors:Error code Meaning35hFile not found37hFile already open47hUser break with cancel (C) key105hPower-off detected106

Strona 464

508Syntax: CALL "FTP.FN3" .fcFSysGet PARA%, ftp.parawhere ftp.para is FTP.PARA% or FTP.PARA$Description: This function gets the current sett

Strona 465

Chapter 18. TCP/IP509Syntax:CALL "FTP.FN3" .fcFSysSet PARA%, ftp.parawhere ftp.para is FTP.PARA% or FTP.PARA$Description: This function chan

Strona 466

510Syntax: CALL "FTP.FN3" .fcPORT FTPHANDLE%, PORT%Description: This function sets a port number specified by PORT% for file transfer.Parame

Strona 467 - 18.5 FTP Client

Chapter 18. TCP/IP511Syntax:CALL "FTP.FN3" .fcDELE FTPHANDLE%, SERV.FNAME$, REPLY%Description: This function deletes a file specified by SER

Strona 468

442.5 Downloading2.5.1 Overview of Transfer Utility/Ir-Transfer Utility C/Ir-Transfer Utility ETransfer Utility/Ir-Transfer Utility C/Ir-Transfer Util

Strona 469

512AppendicesCONTENTSAppendix A Error Codes and Error Messages ... 513A1. Run-time Errors ...

Strona 470 - [ 3 ] Data Files

513AppendicesAppendix AError Codes and Error MessagesA1. Run-time ErrorsError code Meaning00hInternal system error01h NEXT without FOR02hSyntax error0

Strona 471

51436hImproper file type(The statement attempts an operation that conflicts with the file type--data file, communications device file, or bar code dev

Strona 472

515Appendices103h Communications pathway already connected104h Communications pathway already disconnected105h Power-off detected106h An internal erro

Strona 473 - 18.5.3 Using FTP Client

516295h There is no user for login request.400h Failed to get the setting value (Failed to set the value)401h Failed to open a spread spectrum communi

Strona 474 - User Programs (*.PD3)

517AppendicesA2. Compilation Errors Fatal ErrorsError code & Messagefatal error 1: Out of memoryfatal error 2: Work file I/O errorfatal error 3:

Strona 475 - [ 5 ] FTP Transfers

518fatal error 29: Out of memory for cross referencefatal error 30: Cannot find include filefatal error 31: Cannot nest include filefatal error 32: In

Strona 476 - 18.6.1 Overview

519Appendices Syntax ErrorsError code & Messageerror 1: Improper label formaterror 2: Improper label name(redefinition, variable name, or reserved

Strona 477 - Function Number List

520error 21: Too many variables(register float array)error 22: Too many variables(register string array)error 23: Too many variables(common integer

Strona 478

521Appendiceserror 46:error 47:error 48:error 49:error 50: Incorrect use of IF...THEN...ELSE...ENDIFerror 51: Incomplete control structure(IF...THEN..

Strona 479

Chapter 2. Development Environment and Procedures452.6 Executing a User Program2.6.1 StartingTo run a user program, start System Mode and select the d

Strona 480 - .fcConnect Connect socket

522error 77: Initial string too longerror 78: Array symbols exceed 30 for one DIM, GLOBAL, or PRIVATEstatementerror 79: Record number out of range (1

Strona 481 - .fcGSckOpt Get socket option

523Appendices Linking ErrorsError MessagePRC area size differentOut of space in RFG areaOut of space in PRD areaCannot open project fileCannot open o

Strona 482 - 32-bit integer

524* To the [Variable type], any of the following character strings applies:• Non-array integer common variable• Non-array float common variable• Non-

Strona 483

525Appendices Library ErrorsError MessageCannot find object to be deleted [objectname]Designated object already existing [objectname]Cannot find objec

Strona 484 - • • • • • • • •

526Appendix BReserved WordsThe following list shows reserved words (keywords) of BHT-BASIC. Any of these words mustnot be used as a variable name or

Strona 485

527AppendicesAppendix CCharacter SetsC1. Character SetThe table below lists the character set which the BHT can display on the LCD screen. It isbased

Strona 486

528C2. National Character SetsYou may switch characters assigned to codes 20h to 7Fh of the character set table listed inAppendix C1 to one of the nat

Strona 487

529AppendicesAppendix DI/O Ports Input PortsA user program can monitor the hardware status through the input ports by using the WAITstatement or INP

Strona 488

530.pnAlpCtrl 5 0 Software keyboard function.pvAlpOff 0 Disabled.pvAlpOn 1 Enabled1 Software keyboard display-0Hidden.pvAlpDisp 1 Displayed2 Software

Strona 489

531Appendices.pnMKey 6040h 0 Magic key 1 -0Released.pvM1kyOn 1 Held down1 Magic key 2 -0Released.pvM2kyOn 1 Held down2 Magic key 3 -0Released.pvM3kyOn

Strona 490

46Chapter 3 Program StructureCONTENTS3.1 Program Overview... 47

Strona 491

532.pnRwuHost 60F2h 0 Execution record of remote wakeup*17.pvRwuRgst 1 Woken up remotely1 Termination of remote wakeup*18.pvRwuEdOk 1 Terminated nor-m

Strona 492

533Appendices*1Only when the trigger switch function is assigned to either of the magic keys, a user programreturns the ON/OFF state of the switch.*2D

Strona 493

534*9If the BHT is placed on the CU and is ready to be charged (or being charged), then "1" willbe returned. In this condition, the indicat

Strona 494 - .fcSSckOpt Set socket options

535Appendices Output PortsA user program can control the hardware through the output ports by using the OUT statement.BHT-BASIC defines each of these

Strona 495 - .fcShutdwn Shut down socket

536.pnBLight 6022h 0 LCD backlight *10-0Deactivate.pvBLLcd 1 Activate1 Key backlight *10-0Deactivate.pvBLKey 1 Activate.pnTmPOff 6030h 7-0 Effective h

Strona 496 - .fcSocket Create socket

537Appendices*1The indicator LED is controllable only when the bar code device file is closed. If the file isopened, the OUT statement will be ignore

Strona 497 - .fcClose Close socket

538*5To make the TIME$ function return or set the system time, set 0 to this bit; to make theTIME$ function return or set the wakeup time, set 1.Execu

Strona 498

539Appendices*17To defragment the drive, set "0," "1," or "2." Setting "1" or "2" will display an a

Strona 499

540Appendix EKey Number Assignment on the Keyboard Key Number AssignmentThe keys on the BHT keyboard are assigned numbers as shown below. Default Dat

Strona 500

541AppendicesAppendix FMemory Area Memory MapThe memory maps are shown below.This area may be used as a user area if you delete these fonts.Syst

Strona 501

Chapter 3. Program Structure473.1 Program Overview3.1.1 Statement BlocksA statement block is a significant set of statements (which is also called &qu

Strona 502

542The size and area allocation of the memory incorporated in the BHT differ depending upon themodels as listed below.*21Plus a maximum of 404 KB if y

Strona 503 - 18.7 FTP Library (FTP.FN3)

543AppendicesAppendix GHandling Space Characters in Downloading Space characters used as padding charactersA data file can be downloaded with System

Strona 504 - Reply Codes

544 To handle space characters as dataTo handle trailing spaces in a data field as data (not as padding characters), you must takespecial considerati

Strona 505

545AppendicesExample 3When specifying a field data to be searched, do not include trailing spaces in adata field.ABCSend dataABCReceive dataABCData to

Strona 506

546 To make the BHT handle space characters as dataYou can specify the handling of trailing spaces in a data field with System Mode or an XFILEstateme

Strona 507

547AppendicesAppendix HProgramming Notes Program file named APLINT.PD3If a program file named APLINT.PD3 is stored in the BHT, the System Mode initia

Strona 508

548Appendix IProgram SamplesWriting the function for receiving both bar code entry and key entryFeature: This function receives earlier one of either

Strona 509

549Appendicesfnbarkey$ = .kb$ ’Then, return the character.exit defendifselect .kb$case chr$(13)fnbarkey$ = .rt$exit defcase chr$(8) ’BS key.if len(.rt

Strona 510

550Testing the written function while 1 ’Infinite loopa$ = fnbarkey$ (1, "A", 15, "DL") ’F4 and SFT/F4 as escape characters.printi

Strona 511

551AppendicesAppendix JQuick Reference for Statements and FunctionsControlling program flowStatementsCALL Calls an FN3 or SUB function.CHAINTransfers

Strona 512

48[ 3 ] User-defined FunctionsBefore calling user-defined functions, it is necessary to define those functions with any of thefollowing statements. G

Strona 513

552Handling errorsStatementsON ERROR GOTOEnables error trapping.RESUMECauses program execution to resume at a speci-fied location after control is tra

Strona 514

553AppendicesControlling the LCD screenStatementsAPLOADLoads a user-defined font in the single-byte ANKmode.CLSClears the LCD screen.CURSORTurns the c

Strona 515

554Controlling the keyboard inputStatementsINPUTReads input from the keyboard into a variable.KEYAssigns a string or a control code to a function key;

Strona 516 - FTP.PARA%/FTP.PARA$)

555AppendicesCommunicating with I/OsStatementsOUTSends a data byte to an output port.POWERControls the automatic power-off facility.WAITPauses program

Strona 517

556Manipulating data files and user program filesStatementsCLFILEErases the data stored in a data file.CLOSECloses file(s).FIELDAllocates string varia

Strona 518

557AppendicesFunctionsBCC$Returns a block check character (BCC) of a datablock.EOFTests whether the end of a device I/O file has beenreached.ETX$Modif

Strona 519

558Manipulating string dataFunctionsASCReturns the ASCII code value of a given character.CHR$Returns the character corresponding to a givenASCII code.

Strona 520 - Appendices

559AppendicesAppendix KUnsupported Statements and FunctionsBHT-BASIC does not support the following MS-BASIC statements and functions:- For handling s

Strona 521 - Appendix A

560IndexSymbols, (comma) 15, 33, 55, 58, 63, 64, 109, 203,204, 228, 229, 248, 249, 250, 294,295, 296, 297, 298, 299, 302’ (single quotation, single qu

Strona 522

561block-structured statement 16, 47, 48, 49,193, 195, 196, 199, 200, 213, 215,217, 223, 226, 258, 261, 320, 322,323, 327build 6, 8, 14, 17, 18, 19, 2

Strona 523

Chapter 3. Program Structure493.1.2 Notes for Jumping into/out of Statement BlocksIt is not recommended to jump control from a main routine or subrout

Strona 524

562CURSOR iv, 190, 229, 249, 360, 363, 526,553cursor 97, 107, 169, 170, 171, 186, 190,229, 242, 243, 244, 249, 253, 254,294, 295, 302, 330, 350, 360,

Strona 525 - A2. Compilation Errors

563extended function 2, 3, 178, 387, 388extension library, extension libraries 2, 3,177, 178, 431, 432, 434, 435, 436,445, 446, 459, 461, 466, 503exte

Strona 526 - Error code & Message

564integer constant, integerconstant 63,177, 192, 193, 194, 196, 200, 202,203, 204, 206, 207, 214, 216, 221,222, 262, 263, 304, 323, 520interpreter v,

Strona 527 - Syntax Errors

565Nnational character 107, 348, 349, 527, 528,553non-array integer type, non-array integervariable 34, 66, 187, 192, 194, 214,321non-array real type,

Strona 528

566PRINT# 15, 55, 131, 297, 298, 346, 526,556, 559PRIVATE 6, 7, 71, 73, 215, 222, 303, 304,322, 522, 552program file 18, 27, 32, 43, 126, 144, 183,193

Strona 529

567spread spectrum v, 388, 417, 418, 419, 420,421, 422, 424, 425, 426, 428, 430,431, 433, 434, 436, 439, 441, 447,457, 458, 467, 490, 516standard-size

Strona 530

568user-defined font 47, 48, 57, 68, 84, 104,169, 181, 192, 214, 243, 321, 527,553user-defined function 7, 31, 33, 34, 36, 48,49, 57, 58, 68, 77, 149,

Strona 531 - Linking Errors

BHT-BASIC (BHT-100 series)The purpose of this manual is to provide accurate information in the development of applicationprograms in BHT-BASIC. Pleas

Strona 532 - Error Message

503.2 Handling User Programs3.2.1 User Programs in the MemoryThe user area of the memory (memories) in the BHT can store more than one user program.(F

Strona 533 - Library Errors

Chapter 3. Program Structure513.2.3 Included Files"Included files" are separate source programs which may be called by the INCLUDE meta-comm

Strona 534 - Reserved Words

iv Notational Conventions Used in This BookSeveral notational conventions are used in this book for the sake of clarity. 1. Reserved words are printed

Strona 535 - Character Sets

52Chapter 4 Basic Program ElementsCONTENTS4.1 Structure of a Program Line... 5

Strona 536 - C2. National Character Sets

Chapter 4. Basic Program Elements534.1 Structure of a Program Line4.1.1 Format of a Program LineA program line consists of the following elements:[lab

Strona 537 - I/O Ports

54[ 2 ] StatementsStatements can come in two types: executable and declarative statements.• Executable statementsThey make the Interpreter process pr

Strona 538 - TIME$ function -0System time

Chapter 4. Basic Program Elements554.1.2 Program Line Length A program line is terminated with a CR code by pressing the carriage return key.The allow

Strona 539

564.2 Usable Characters4.2.1 Usable CharactersListed below are characters which can be used for writing programs. Note that a double quote(") ca

Strona 540

Chapter 4. Basic Program Elements574.2.2 Special Symbols and Control CodesSymbols and control codes used outside of a character string have the follow

Strona 541 - RS/CS control

58:(Colon)• Separates statements.• Separates time information in TIME$ function.;(Semicolon)Line feed control character in INPUT and other statements.

Strona 542

Chapter 4. Basic Program Elements594.3 LabelsA label can contain the following characters:• Alphabet characters• Numeral characters• Period (.) Rules

Strona 543 - Output Ports

604.4 IdentifiersIdentifiers for the names of variables should comprise the same alphanumerics as the labels. Rules for naming identifiers• The identi

Strona 544

Chapter 4. Basic Program Elements614.5 Reserved Words"Reserved words" are keywords to be used in statements, functions, and operators. For

Strona 545

v Icons Used in This BookStatements and functions unique to BHT-BASIC. Syntax for the Statement Reference and Function ReferenceThe syntax in program

Strona 546

62Chapter 5 Data TypesCONTENTS5.1 Constants... 635

Strona 547

Chapter 5. Data Types635.1 Constants5.1.1 Types of ConstantsA constant is a data item whose value does not change during program execution. Constants

Strona 548 - Appendix E

64 Real ConstantsReal constants should be formatted as shown below.Syntax:sign mantissaSyntax: sign mantissa E sign exponentWhere a lowercase letter &

Strona 549 - Memory Area

Chapter 5. Data Types655.2 VariablesA variable is a symbolic name that refers to a unit of data storage. The contents of a variablecan change during

Strona 550 - Battery Backup of Memory

66 Memory OccupationA string variable occupies the memory space by (the number of characters + one) bytes, wherethe added one byte is used for the cha

Strona 551 - Host computer

Chapter 5. Data Types675.2.2 Classification of Variables Work VariablesA work variable is intended for general use. You may use it either by declari

Strona 552 - SEARCH function

685.3 User-defined FunctionsOut of user-defined functions, the SUB and FUNCTION functions can be called from otherfiles. The DEF FN function can be c

Strona 553 - Example 3

Chapter 5. Data Types695.4 Type Conversion5.4.1 Type ConversionBHT-BASIC has the type conversion facility which automatically converts a value of one

Strona 554 - XFILE statement

705.4.2 Type Conversion ExamplesThe following examples show the type conversion from real to integer. Assignment of Real Expressions to Integer Variab

Strona 555 - Programming Notes

Chapter 5. Data Types715.5 Scope of VariablesYou may scope work variables and register variables to be local or global with the PRIVATEor GLOBAL state

Strona 556 - Program Samples

vi Bar Code and 2D CodeThe BHT-100B is capable of reading bar codes; the BHT-100Q is capable of reading 2Dcodes and bar codes. In descriptions common

Strona 557

72If used inside the SUB or FUNCTION function in the same file where the global variable isdefined, the variable will also have the same value.(Exampl

Strona 558

Chapter 5. Data Types735.5.2 Local VariablesA local variable can be accessed only in a file where it is defined. Write PRIVATE preceding adesired vari

Strona 559 - Quick Reference

745.5.3 Variables Not Declared to be Global or LocalIf not declared to be global or local, a variable is closed in each file where it is defined. A va

Strona 560 - Handling errors

Chapter 5. Data Types755.5.4 Common VariablesA common variable should be declared in a main object beforehand. To share the commonvariable by files ot

Strona 561 - Controlling the LCD screen

76Chapter 6 Expressions and OperatorsCONTENTS6.1 Overview...

Strona 562

Chapter 6. Expressions and Operators776.1 OverviewAn expression is defined as a combination of constants, variables, and other expressionswhich are co

Strona 563 - Communicating with I/Os

786.2 Operator PrecedenceWhen an expression contains more than one operator, BHT-BASIC performs the operations inthe standard precedence as shown belo

Strona 564

Chapter 6. Expressions and Operators79When more than one operator occurs at the same level of precedence, the BHT-BASICresolves the expression by proc

Strona 565 - Manipulating numeric data

806.3 Operators6.3.1 Arithmetic OperatorsArithmetic operators include a negative sign (-) and operators for multiplication (*), division (/),addition

Strona 566 - Specifying included files

Chapter 6. Expressions and Operators816.3.2 Relational OperatorsA relational operator compares two values. Depending upon whether the comparison is t

Strona 567 - Appendix K

1Chapter 1 Software Overview for the BHTCONTENTS1.1 Software Overview...

Strona 568

826.3.3 Logical OperatorsA logical operator combines multiple tests and manipulates Boolean operands, then returnsthe results. It is used, for exampl

Strona 569

Chapter 6. Expressions and Operators83[ 2 ] The AND operatorThe AND operator ANDs the same order bits in two expressions on either side of the operato

Strona 570

846.3.4 Function OperatorsThe following two types of functions are available in BHT-BASIC, both of which work as func-tion operators: Built-in Functio

Strona 571

Chapter 6. Expressions and Operators85 Comparison of Character StringsThe string operators compare two character strings according to character codes

Strona 572

86Chapter 7 I/O FacilitiesCONTENTS7.1 Output to the LCD Screen ... 887.1.1 D

Strona 573

Chapter 7. I/O Facilities87[ 5 ] Keystroke trapping ... 1187.5.3 User-Defined Touch Key

Strona 574

887.1 Output to the LCD Screen7.1.1 Display Fonts[ 1 ] Screen mode, font size, and display angleListed below are the fonts available on each BHT serie

Strona 575

Chapter 7. I/O Facilities89 Screen modeThe ANK mode displays ANK characters listed in Appendices C1 and C2.The Kanji mode displays the following char

Strona 576

90[ 2 ] Character attributes (Reverse font attribute, enlargementattribute, tone attribute) Reverse font attributeCharacters may be reversed (highlig

Strona 577 - Programmer’s Manual

Chapter 7. I/O Facilities917.1.2 Coordinates on the LCDTo locate characters on the coordinates of the LCD screen, use the LOCATE statement. Toobtain t

Komentarze do niniejszej Instrukcji

Brak uwag