
203
numericinitialvaluedefinition
For one-dimensional:
{numericconstant[,numericconstant...]}
DEFREG n6%(3)={9,8,7,6}
For two-dimensional:
{{numericconstant[,numericconstant...]}, {numer-
icconstant[,numericconstant...]} ...}
DEFREG n7(1,2)={{10,11,12},{13,14,15}}
stringinitialvaluedefinition
For one-dimensional:
{stringconstant[,stringconstant...]}
DEFREG s3$(3)={"a","bc","123","45"}
For two-dimensional:
{{stringconstant[,stringconstant...]}, {string-
constant[,stringconstant...]} ...}
DEFREG s4$(1,1)={{"a","b"},{"c","1"}}
stringlength
An integer constant from 1 to 255.
Description:
DEFREG
defines non-array or array register variables.
• A
DEFREG
statement can appear anywhere in a source program.
• Up to 2-dimensional array variables can be defined.
• For both
non-arraystringvariable
and
arraystringvariable
,
the string length can be specified.
• Defaults:
stringlength
for non-array variables: 40 characters
stringlength
for array variables:
20 characters
• The memory area for register variables is allocated in user program files in the
memory. Register variables, therefore, are always updated. An uploaded user
program, for example, contains the updated register variables if defined.
• The total number of bytes allowable for register variables is 64 kilobytes.
• You can specify an initial value to an array variable by enclosing it with a pair of
braces { }. No comma (,) is allowed for terminating the list of initial values.
If the number of the specified initial values is less than that of the array elements
or if no initial value is specified, then the Compiler automatically sets a zero (0) or
a null string as an initial value for a numeric variable or a string variable of the
array elements not assigned initial values, respectively.
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...