Use - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

1112
l
arith_var
! [
I
arith-var
) ]
USE
char-var
char-var
(
arith-arr (rows Lcolumnsl)
,
arith-arr (rows Lcolumnsl )(
•...
char-arr (rows Lcolumnsl )
char-arr (rows [,columnsJ) ,
/
USE
The USE statement allows you to specify variables to be assigned to the common
area of storage. This common area of storage holds these specified variables and
passes them from one BASIC program to the next. The values of these variables
are not changed when one program CHAINs to another program (see CHAIN statement).
The syntax of the USE statement is as shown:
l
arith_var
![ I
arith-var
) ]
char-var
char-var
(
USE
arith-arr (rows Lcolumnsl)
I
arith-arr (rows [,columnsl ) (
•...
char-arr (rows Lcolumnsl)
char-arr (rows Lcolumnsl ) ,
/
where:
var
or
arr
is a numeric or character variable or array that is to be assigned to the
common area of storage.
rows, columns
are required only for arrays. These nonzero, unsigned integer
constants specify the number of rows and columns to provide the dimensions
of the array assigned to the common area of storage.
Notes About USE
• If a variable is defined as an array in a USE statement, it must not be included
in a DIM statement (see DIMh
• USE must be specified in both the program chained from and chained to.
• If one or two dimensions are specified for a variable, the variable is assigned to
the common storage area as an array with those dimensions.
• Only one USE statement can be entered in a program and it must be the first
statement executed that contains a variable reference. Thus, for example, the
DEF, unconditional GOSUB, and GOTO statements can be executed before the
USE statement.
• Variable data is assigned in the common area of storage in the same sequence in
which it was entered in the USE statement. Thus, data values are unpredictable
if data types differ from one chained program to the next.
,/

Advertisement

Table of Contents
loading

Table of Contents