Installation guide

60 Programming Commands
7.1 SEBASIC Conventions
A basic-like language conforms to most of the rules and
conventions of modern implementations of the BASIC
programming Language, such as “QuickBasic”, etc. Fol-
lowing is a summary of the considerations to be used in
writing your programs.
7.1.1 Arithmetic Operators
The SEBASIC arithmetic operators are listed in order of
precedence.
Operator Function
- Negation.
* , / Multiplication and division.
+ , - Addition and subtraction.
Parentheses changes the order in which arithmetic opera-
tions are performed. Operations within parentheses are
performed first. Inside parentheses, the usual order of op-
eration is maintained.
Note: Squaring and exponentiation are not supported; use
multiplication to perform these operations.
Example: to calculate X
3
, use X*X*X.
7.1.2 Logical Operators
Logical operators perform test on multiple relations, bit
manipulations or Boolean operations and return a “true”
(one) or “false” (zero) value used in making a decision.
These operators are used in Boolean expressions. The
logical operators in SEBASIC, listed in order of prece-
dence, are as follows:
Operator Use
NOT NOT <term> a false term, results in the
Boolean expression being true.
AND <term AND <term> if both terms are true,
results in the Boolean expression being
true.
OR <term> OR <term> if either term is true,
results in the Boolean expression being
true.
7.1.3 Relationship Operators
Relationship operators are used to compare two values.
The result of the comparison is either “true” (one) or
“false” (zero). This result can then be used to make a deci-
sion regarding program flow.
Operator Relation Expression
= Equality * X = Y
<> Inequality X <> Y
< Less than X < Y
> Greater than X > Y
<= Less than or equal to X <= Y
>= Greater than or equal to X >= Y
* The equal sign (=) is also used to assign a value to a
variable.
7.1.4 Basic Data Types
Two basic data types exist: floating point values (REAL)
and string values. All values are assumed to be floating
point unless a $ suffix is used.
x x is a floating point variable.
x$ x$ is a string variable.
Note: All variable names and program labels must begin
with a letter A-Z.
7.1.5 Case Sensitivity in Statements
&
Commands
Some programming statements and commands are case-
sensitive; others are not. The following table defines case
sensitivity in SEBASIC:
Basic Language
Element
Case
Sensitive?
Max. Length
(characters)
Label No 80
Variable name No 80
String constant Yes 80
Basic Keyword No N/A
The Host commands are not case sensitive; that is, upper
and lower case letters can be used interchangeably.