EasyManua.ls Logo

CipherLab 8 Series

CipherLab 8 Series
263 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
21
Chapter 3 Basics of the CipherLab BASIC Language
3.3 EXPRESSION AND OPERATORS
An expression may be a string or numeric constant, or a variable, or it may be a
combination of constants and variables with operators to produce a single value.
Operators perform mathematical or logical operations. The operators provided by the
CipherLab BASIC Compiler may be divided into four categories, namely, Assignment
Operator, Arithmetic Operators, Relational Operators, and Logical Operators.
3.3.1 ASSIGNMENT OPERATOR
The CipherLab BASIC Compiler supports an assignment operator: “=”. For example,
Length% = 100
PI! = 3.14159
Company$ = CipherLab Co., Ltd.
3.3.2 ARITHMETIC OPERATOR
The arithmetic operators are:
Operator
Operation
Sample Expression
^
Exponentiation
A% = 9^3
-
Negation (unary)
A% = -B%
*
Multiplication
A! = B! * C!
\
Division (integer)
A% = B! \ C!
/
Division (real)
A! = B! / C!
+
Addition
A% = B% + C%
-
Subtraction
A% = B% - C%
MOD
Modulo arithmetic
A% = B% MOD C%

Table of Contents

Related product manuals