![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429044.webp)
34
This statement may define either numeric or string functions. If a type is spe-
cified in the function name, the value of the expression is forced to that type
before it is returned to the calling statement.
If a type is specified in the function name and the argument type does not
match, an error will occur.
DEF/INT/SNG/DBL/STR
Statement
Purpose:
To declare variable types as integer, single-precision, double-
precision, or string
Format: DEF
<type><letter>[-<letter>]
[<letter>[-<letter>]]...
<type> is INT, SNG, DBL, or STR
Remarks:
Any variable names beginning with the <letter(s)> listed will automatically be
assigned to the specified variable type.
The “”, “!”, and “$” declaration characters take precedence over a DEF
<type> statement.
If no type declaration statements are encountered, BASIC assumes all vari-
ables without declaration characters to be single-precision variables.
Example:
DEFINT A-D, X
All variables beginning with A, B, C, D, and X will be integer variables.
DEF USER Statement
Purpose:
To specify the starting address of an assembly language subrou-
tine that will be called via the USR function
Format:
DEF USR [<digit>] = <offset>
<digit> is an integer from 0 to 9. The digit corresponds to the
USR routine number whose address is being specified. If <digit>
is omitted, DEF USR0 is assumed.
<offset> is the starting address of the USR routine.
Remarks:
Any number of DEF USR statements may appear in a program to redefine
subroutine starting addresses, thus allowing access to as many subroutines
as necessary.
Program Example:
100
DEF USR1=&H2100
110
POKE &H2100, &H39
120
A=USR1 (A)
130
PRINT A
DIM Statement
Purpose:
To specify the maximum values for array variable subscripts and
allocate storage accordingly
Format: DIM
<variable>(<subscripts>)
[ ,<variable>(<subscripts>)]...
<variable> is a legal variable name.
BASIC Language
Section 4-2
Summary of Contents for SYSMAC C200H-ASC02
Page 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Page 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Page 122: ...Appendix B Specifications 115 130 35 100 5 ...
Page 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...