Program statements – BrightSign HD2000 BrightScript Reference Guide User Manual

Page 12

Advertising
background image

12

Program Statements

Type
Definition

Assignment &
Allocation

Sequence of
Execution

(Conditional
Statements)

DEFINT

CLEAR

END

IF

DEFSNG DIM

STOP

THEN

DEFDBL LET

GOTO

ELSE

DEFSTR

DATA

GOSUB

READ

RETURN

RESTORE

ON ... GOTO

ON ... GOSUB

FOR-NEXT-STEP

ON ERROR GOTO

RESUME

REM

DEFtype

• DEFINT letter or range

• DEFSNG letter or range

• DEFDBL letter or range

• DEFSTR letter or range


Examples:
DEFINT A,I,N

All variables beginning with A, I or N will be treated as integers. For example, Al, AA, 13 and NN will be
integer variables. However, A1#, AA#, I3# would still be double precision variables, because of the type
declaration characters, which always override DEF statements.

DEFINT I-N

Causes variables beginning with I, J, K, L, M or N to be treated as integer variables.
DEFINT may be placed anywhere in a program, but it is normally placed at the beginning of a program.

CLEAR

Deletes all variables values and types, and array dimensions. Clears any DEFtypes

.

DIM name (dim1, dim2, …, dimK)

Lets you set the "depth" (number of elements allowed per dimension) of an array or list of arrays. If no DIM
statement is used, a depth of 11 (subscripts 0-10) is allowed for each dimension of each array used.
Example:
DIM A(5),B(2,3),C$(20)

Advertising
This manual is related to the following products: