
127
Program Configuration
Section 7-4
a long integer within the range of –2147483648 to 2147483647, an over-
flow error will occur.
Example
:
LET A = NOT 12.34, –13 is assigned as A.
5.
When a real number is converted into an integer, the value is rounded.
Example
:
A = 12.3: “12” is assigned to A.
B = 12.6: “13” is assigned to B.
7-4-8
Expressions
Expressions refer to constants, variables, and functions that have been com-
bined by operators. Numeric values, variables, or characters alone can also
form expressions. There are four types of expressions.
• Arithmetic
• Relational
• Logical
• Character
Of these, the first three produce numeric values as a result and are thus
called “numeric expressions.” The last type is called a “character expression.”
Character Operators
A character expression is made up of character constants and variables that
are linked with the character operator “+.” Instead of adding characters
together, the “+” operator links the characters together to form one character
string.
Input:
A$ = “CF”
B$ = “BASIC”
PRINT A$ + “–” + B$
Output: CF–BASIC” is displayed.
Arithmetic Operators
An arithmetic expression is made up of constants, variables, and functions
combined using arithmetic operators. A list of valid arithmetic operators is
shown in the following table.
If A or B is a real number in an expression using the \ or MOD operator, the
decimal part is first rounded up to convert the real number into an integer, and
then the operation is performed.
Expression
Character operator
Numeric expression
Relational operator
Arithmetic operator
Logical operator
Arithmetic operator
Example
Operation
+
A + B
Addition
–
A – B, –A
Subtraction or negation
*
A * B
Multiplication
/
A / B
Real number division
\
A \ B
Integer division
MOD
A MOD B
Remainder after integer division
^
A ^ B
Exponentiation
Содержание C200H-ASC11
Страница 1: ...C200H ASC11 ASC21 ASC31 ASCII Units Operation Manual Revised June 2000...
Страница 2: ...iv...
Страница 4: ...vi...