![background image](http://html1.mh-extra.com/html/omron/sysmac-c200h-asc02/sysmac-c200h-asc02_operation-manual_742429030.webp)
20
4-1
Program Configuration
A BASIC program consists of commands, statements, and functions.
BASIC Language
Command
Function
Arithmetic operation function
Character string function
Special function
Statement
General statement
Device control statement
Basic Statements designate and control the flow of programs and are gen-
erally used in program lines within a program.
Basic Commands are usually entered from the command line and control
operations external to the program such as printing and listing.
Examples: print, list, run
Functions are self-contained programs which accept one or more argu-
ments, perform predefined calculations, and return a result/s. There are pre-
defined BASIC functions for arithmetic and string operations as well as user-
defined functions.
Examples: INT(x), LOG(x), SQR(x)
Lines and Statements
A program written in BASIC is a series of lines, each of which consists of one
or more statements. If several statement are written on the same line, they
must be separated with colons(:). A line can be no longer than 255 charac-
ters. Use single quotation marks (’) to separate comments.
Example of four statements on a line:
10 FOR L=1 TO 100: J=L*I: PRINT J: NEXT L
Line Numbers
Every BASIC program line begins with a line number. Line numbers indicate
the order in which the program lines are stored in memory and are also used
as references for branching and editing. Line numbers must be in the range
of 0 through 63999. A period may be used in AUTO, DELETE, EDIT, and
LIST commands to refer to the current line.
Examples:
LIST. EDIT. AUTO DEL 100-
Character Set
The BASIC character set comprises alphabetical characters, numeric charac-
ters, and special characters.
The alphabetic characters in BASIC are the upper case and lower case let-
ters of the alphabet. The numeric characters in BASIC are the digits 0
through 9.
The following special characters are recognized by BASIC:
SP (space) ! ” # $ & ’ ( ) * + , - . / : ; < = > ? [ \ } ^ _
Constants
The following can be used as constants:
Program Configuration
Section 4-1
Содержание 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 ...