
7-6
Section
Details of BASIC Commands
188
option length
Syntax:
OPTION LENGTH
<numerical expression>
Description:
Statement. Declares the maximum length for string variables and sets the static method for
allocation of memory to string variables.
Remarks:
<numerical expression> specifies the maximum length of the string variables. It has a valid range
of [1…255]. Put the
OPTION LENGTH
statement in the first line of the program or just after the
PWORD
statement if a
PWORD
statement is being used, too.
The dynamic allocation method is used when no settings have been made for the allocation of
memory to string variables. With this method, memory is reallocated in the character string
variable area as the program is being executed. When the
OPTION LENGTH
statement is used to
declare the required length, memory is allocated before the program is executed, so memory is not
reallocated in the character string variable area as the program is being executed.
The
OPTION LENGTH
statement can be used only once. It must be used before any string variables
have been declared.
Examples:
> 10 OPTION LENGTH 32
> 20 A$ = “THIS STRING IS LONGER THAN THE SPECIFIED LENGTH”
> 30 PRINT A$
> RUN
THIS STRING IS LONGER THAN THE S
See also:
DIM
pc on/off/stop
Syntax:
PC
[<pc interrupt number>] (
ON
|
OFF
|
STOP
)
Description:
Statement. Enables, disables or stops interrupts from the PC.
Remarks:
<pc interrupt number> specifies which interrupt from the
PC
to turn
ON
,
OFF
or
STOP
. There are 99
PC
interrupts that can be defined. The valid range is [1…99]. If the <pc interrupt number> is
omitted this statement applies to all
PC
interrupts.
ON
enables (unmasks) the PC interrupts. When a PC interrupt occurs, program execution will be
branched to the specified interrupt subroutine for interrupt processing. The PC interrupts are
enabled until they are disabled with the
PC OFF
statement.
OFF
disables the interrupt. All subsequent PC interrupts are ignored.
STOP
masks and enables the interrupt. If a PC interrupt is received, it is stored in memory but
program execution is not branched to the interrupt subroutine. Program execution will be
branched to the subroutine when the interrupt is unmasked with the
PC ON
statement.
The
PC ON
/
OFF
/
STOP
statements can be executed meaningfully only after the
ON PC
statement has
been executed.
Examples:
> 10 ON PC 1 GOSUB 70
> 20 ON PC 2 GOSUB 90
> 30 ON PC 3 GOSUB 110
> 40 PC ON
> 50 GOTO 50
> 60 PRINT "PC INTERRUPT #1"
> 70 RETURN
> 80 PRINT " PC INTERRUPT #2"
> 90 RETURN
> 100 PRINT " PC INTERRUPT #3"
> 110 RETURN
See also:
ON PC
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...