![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429049.webp)
39
100
PC READ “@D,0,1,14”;A
110
RETURN
200
PC WRITE “@D,0,1,14”;A
210
RETURN
LET Statement
Purpose:
To assign the value of an expression on the right side of an equal
sign to the variable on the left side
Format: [LET]
<variable>=<expression>
Example:
LET A = 1.2
Remarks:
Notice the word LET is optional, i.e., the equal sign is sufficient when assign-
ing an expression to a variable name.
Assignment of a character variable to a numeric variable, and the reverse,
are not permitted.
When assigning unmatched types of numeric variables, the variable type on
the right side of the equal sign is converted into the type on the left before the
assignment is performed.
String assignments should be enclosed in double quotation marks.
LINE INPUT Statement
Purpose:
To input an entire line of characters (up to 255) from the key-
board or other input device without the use of delimiters
Format:
LINE INPUT [#<port>,] [“<prompt>”;]<string>
<port> is the port number (1 or 2).
“<prompt>” is a message displayed on the screen prompting the
user for input.
<string> is a string variable that is assigned to the input charac-
ter string.
Example:
LINE INPUT #2,”DATE”;A$
Remarks:
All of the characters input from the end of the prompt to the carriage return
are assigned to the character variable as a series of data. (Commas and co-
lons are also treated as character data.)
A question mark is not displayed unless it is part of the prompt string.
The prompt statement is not displayed if a peripheral device other than
TERM or COMU is selected with the OPEN statement.
The character string is not assigned to the variable until the carriage return
key is pressed. Until then, the BASIC LED indicator on the ASCII Unit will
blink indicating that the Unit is waiting for input of a carriage return.
If the port number is omitted, port 1 is assumed as the default port.
MID$ Statement
Purpose:
To replace a portion of one string with another string
Format:
MID$(<string 1>,<n>[,<m>]) = <string 2>
<string 1> is a string variable.
<n> is an integer expression from 1 to 255.
BASIC Language
Section 4-2
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...